From 9269fa06807ab456133dd733d12cd22cdd0965f6 Mon Sep 17 00:00:00 2001 From: patrickhuie19 Date: Fri, 16 Aug 2024 17:59:51 -0400 Subject: [PATCH] lint + CustomDefaultsEnvKey --> CustomDefaults --- core/chains/evm/config/toml/defaults.go | 6 +++--- core/config/env/env.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/chains/evm/config/toml/defaults.go b/core/chains/evm/config/toml/defaults.go index 40664bb34c3..3f16f7062c0 100644 --- a/core/chains/evm/config/toml/defaults.go +++ b/core/chains/evm/config/toml/defaults.go @@ -75,7 +75,7 @@ func init() { }) // read the custom defaults overrides - dir := os.Getenv(string(env.CustomDefaultsEnvKey)) + dir := env.CustomDefaults.Get() if dir == "" { // short-circuit; no default overrides provided return @@ -97,14 +97,14 @@ func init() { path := dir + "/" + entry.Name() file, err := os.Open(path) if err != nil { - log.Printf("error opening file (name: %v) in custom defaults override directory: %w", entry.Name(), err) + log.Printf("error opening file (name: %v) in custom defaults override directory: %v", entry.Name(), err) continue } // Read file contents b, err := io.ReadAll(file) if err != nil { - log.Printf("error reading file (name: %v) contents in custom defaults override directory: %w", entry.Name(), err) + log.Printf("error reading file (name: %v) contents in custom defaults override directory: %v", entry.Name(), err) file.Close() continue } diff --git a/core/config/env/env.go b/core/config/env/env.go index 7d7757a22a9..c34cd7f4f5e 100644 --- a/core/config/env/env.go +++ b/core/config/env/env.go @@ -20,7 +20,7 @@ var ( ThresholdKeyShare = Secret("CL_THRESHOLD_KEY_SHARE") // Migrations env vars EVMChainIDNotNullMigration0195 = "CL_EVM_CHAINID_NOT_NULL_MIGRATION_0195" - CustomDefaultsEnvKey = Var("CL_CHAIN_DEFAULTS") + CustomDefaults = Var("CL_CHAIN_DEFAULTS") ) // LOOPP commands and vars