From cafb2272f1302cea59ccffe1542ebf883e344627 Mon Sep 17 00:00:00 2001 From: Jeff Hodges Date: Thu, 12 Dec 2024 11:36:49 -0800 Subject: [PATCH] monitor: remove the unneeded conf.env field (#1083) 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. --- tools/autograph-monitor/monitor.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/autograph-monitor/monitor.go b/tools/autograph-monitor/monitor.go index f2606a175..2f9401510 100644 --- a/tools/autograph-monitor/monitor.go +++ b/tools/autograph-monitor/monitor.go @@ -33,7 +33,6 @@ type configuration struct { origAutographURL string requestURL string monitoringKey string - env string rootHashes []string truststore *x509.CertPool @@ -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":