diff --git a/pkg/config/config.go b/pkg/config/config.go index 1af016c5d..0a3fbef7d 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -55,7 +55,7 @@ type Finch struct { // Has no effect on systems where Rosetta 2 is not available (Intel/AMD64 macs, or macOS < 13.0). // This setting will only be applied on vm init. Rosetta *bool `yaml:"rosetta,omitempty"` - HostGatewayIp *string `yaml:"host_gateway_ip,omitempty"` + HostGatewayIP *string `yaml:"host_gateway_ip,omitempty"` } // Nerdctl is a copy from github.com/containerd/nerdctl/cmd/nerdctl/main.go diff --git a/pkg/config/nerdctl_config_applier.go b/pkg/config/nerdctl_config_applier.go index 2e637c1d5..916c99d23 100644 --- a/pkg/config/nerdctl_config_applier.go +++ b/pkg/config/nerdctl_config_applier.go @@ -127,8 +127,8 @@ func updateNerdctlConfig(fc *Finch, fs afero.Fs, user string, rootless bool) err cfg.Namespace = nerdctlNamespace cfg.HostGatewayIP = "192.168.5.2" - if fc.HostGatewayIp != nil { - cfg.HostGatewayIP = *fc.HostGatewayIp + if fc.HostGatewayIP != nil { + cfg.HostGatewayIP = *fc.HostGatewayIP } updatedCfg, err := toml.Marshal(cfg) diff --git a/pkg/config/nerdctl_config_applier_test.go b/pkg/config/nerdctl_config_applier_test.go index 8e94db8cf..2ac67ec4d 100644 --- a/pkg/config/nerdctl_config_applier_test.go +++ b/pkg/config/nerdctl_config_applier_test.go @@ -185,7 +185,7 @@ func Test_updateNerdctlConfig(t *testing.T) { Memory: pointer.String("4GiB"), VMType: pointer.String("qemu"), Rosetta: pointer.Bool(false), - HostGatewayIp: pointer.String("192.168.31.1"), + HostGatewayIP: pointer.String("192.168.31.1"), } t.Run(tc.name, func(t *testing.T) { t.Parallel()