From c01d897da61734e47dec89bad42d42df94455548 Mon Sep 17 00:00:00 2001 From: otherview Date: Mon, 4 Dec 2023 10:43:36 +0000 Subject: [PATCH] nit --- go/config/enclave_config.go | 2 +- go/config/enclave_config_test.go | 4 ++-- go/enclave/main/main.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/config/enclave_config.go b/go/config/enclave_config.go index 4feb2244f5..aa1dd7fc28 100644 --- a/go/config/enclave_config.go +++ b/go/config/enclave_config.go @@ -105,7 +105,7 @@ func DefaultEnclaveConfig() *EnclaveConfig { } } -func FromFlags(cliFlags map[string]*flag.TenFlag) (*EnclaveConfig, error) { +func NewConfigFromFlags(cliFlags map[string]*flag.TenFlag) (*EnclaveConfig, error) { flagsTestMode := false // check if it's in test mode or not diff --git a/go/config/enclave_config_test.go b/go/config/enclave_config_test.go index 4798efe536..81854d7c3f 100644 --- a/go/config/enclave_config_test.go +++ b/go/config/enclave_config_test.go @@ -90,7 +90,7 @@ func TestRestrictedMode(t *testing.T) { flag.Parse() - enclaveConfig, err := FromFlags(flags) + enclaveConfig, err := NewConfigFromFlags(flags) require.NoError(t, err) require.Equal(t, int64(4444), enclaveConfig.L1ChainID) @@ -132,6 +132,6 @@ func TestRestrictedModeNoCLIDuplication(t *testing.T) { flag.Parse() - _, err = FromFlags(flags) + _, err = NewConfigFromFlags(flags) require.Errorf(t, err, "restricted flag was set: l1ChainID") } diff --git a/go/enclave/main/main.go b/go/enclave/main/main.go index 7d062a1b06..e276990960 100644 --- a/go/enclave/main/main.go +++ b/go/enclave/main/main.go @@ -20,7 +20,7 @@ func main() { tenflag.Parse() - enclaveConfig, err := config.FromFlags(flags) + enclaveConfig, err := config.NewConfigFromFlags(flags) if err != nil { panic(fmt.Errorf("unable to create config from flags - %w", err)) }