Skip to content

Commit 89767c1

Browse files
heyvitojandubois
andcommitted
fixup: Update guestIPMustBeZero error message
Co-authored-by: Jan Dubois <[email protected]> Signed-off-by: Victor Gama <[email protected]>
1 parent d010add commit 89767c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/limayaml/validate.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,7 @@ func Validate(y LimaYAML, warn bool) error {
173173
for i, rule := range y.PortForwards {
174174
field := fmt.Sprintf("portForwards[%d]", i)
175175
if rule.GuestIPMustBeZero && !rule.GuestIP.Equal(net.IPv4zero) && !rule.GuestIP.Equal(net.IPv6zero) {
176-
// Using IPv6 first so go vet doesn't complain about the error
177-
// message ending with a colon.
178-
return fmt.Errorf("field `%s.guestIPMustBeZero` can only be true when field `%s.guestIP` is either :: or 0.0.0.0", field, field)
176+
return fmt.Errorf("field `%s.guestIPMustBeZero` can only be true when field `%s.guestIP` is either `0.0.0.0` or `::`", field, field)
179177
}
180178
if rule.GuestPort != 0 {
181179
if rule.GuestSocket != "" {

0 commit comments

Comments
 (0)