Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed Dec 4, 2023
1 parent 2da41e0 commit c01d897
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go/config/enclave_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go/config/enclave_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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")
}
2 changes: 1 addition & 1 deletion go/enclave/main/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit c01d897

Please sign in to comment.