Skip to content

Commit

Permalink
monitor: remove the unneeded conf.env field (#1083)
Browse files Browse the repository at this point in the history
The `configuration.env` field is immediately used and never referenced
again. Remove it.

Along the way, strip spaces out to be gentler to the next maintainer.
  • Loading branch information
jmhodges authored Dec 12, 2024
1 parent 2db7a25 commit cafb227
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tools/autograph-monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type configuration struct {
origAutographURL string
requestURL string
monitoringKey string
env string
rootHashes []string
truststore *x509.CertPool

Expand Down Expand Up @@ -84,9 +83,8 @@ func main() {
// configure monitor to check responses against Fx stage or
// prod or autograph dev code signing PKI roots and CA root
// certs defined in constants.go
conf.env = os.Getenv("AUTOGRAPH_ENV")
var rootErr, depErr error
switch conf.env {
switch strings.TrimSpace(os.Getenv("AUTOGRAPH_ENV")) {
case "dev":
conf.truststore, conf.rootHashes, rootErr = loadCertsToTruststore(firefoxPkiDevRoots)
case "stage":
Expand Down

0 comments on commit cafb227

Please sign in to comment.