fix: lint issues

This commit is contained in:
Kevin Franklin Kim 2025-08-01 09:17:59 +02:00
parent 9f8ef32d21
commit 2c888893bf
No known key found for this signature in database
3 changed files with 7 additions and 3 deletions

View File

@ -192,6 +192,10 @@ linters:
disabled: true
- name: unchecked-type-assertion
disabled: true
- name: var-naming
disabled: true
- name: enforce-switch-style
disabled: true
testifylint:
disable:
- float-compare

View File

@ -182,7 +182,7 @@ func (c *Command) edit(ctx context.Context, r *readline.Readline) error {
if value := os.Getenv("EDITOR"); value != "" {
d = value
}
editor := exec.Command(d, filename)
editor := exec.CommandContext(ctx, d, filename)
editor.Stdin = os.Stdin
editor.Stdout = os.Stdout
editor.Stderr = os.Stderr

View File

@ -56,14 +56,14 @@ func RegistryChecker(inst *K3d) check.Checker {
for _, registry := range registries {
if registry.Name == fmt.Sprintf("k3d-%s", inst.cfg.Registry.Name) {
ips, err := net.LookupIP(registry.Name)
ips, err := net.DefaultResolver.LookupIPAddr(ctx, registry.Name)
if err != nil {
return []check.Info{check.NewFailureInfo(title, fmt.Sprintf("Failed to lookup registry IP (%s)", err.Error()))}
}
var configured bool
for _, ip := range ips {
if ip.String() == "127.0.0.1" {
if ip.IP.String() == "127.0.0.1" {
configured = true
break
}