Repository: lima-vm/lima

Issue:
`import()` lines should have three blocks (stdlib, third-party, local)
>> Well maybe the 2nd block was supposed to be external packages, except for lima-vm, and the 3rd block was just lima-vm?
>
> 👍 
> Should be covered in another PR with a linter rule to enforce that

_Originally posted by @AkihiroSuda in https://github.com/lima-vm/lima/pull/3578#discussion_r2106678540_
            

Hints from issue comments:

Solution patch:
diff --git a/.golangci.yml b/.golangci.yml
index 9fe5e678..3634b2b9 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -146,6 +146,12 @@ issues:
   max-same-issues: 0
 formatters:
   enable:
+  - gci
   - gofmt
   - gofumpt
-  - goimports
+  settings:
+    gci:
+      sections:
+      - standard
+      - default
+      - localmodule
diff --git a/cmd/lima-guestagent/daemon_linux.go b/cmd/lima-guestagent/daemon_linux.go
index f15f5ae8..919edb19 100644
--- a/cmd/lima-guestagent/daemon_linux.go
+++ b/cmd/lima-guestagent/daemon_linux.go
@@ -9,13 +9,14 @@ import (
 	"os"
 	"time"
 
+	"github.com/mdlayher/vsock"
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/guestagent"
 	"github.com/lima-vm/lima/pkg/guestagent/api/server"
 	"github.com/lima-vm/lima/pkg/guestagent/serialport"
 	"github.com/lima-vm/lima/pkg/portfwdserver"
-	"github.com/mdlayher/vsock"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newDaemonCommand() *cobra.Command {
diff --git a/cmd/lima-guestagent/install_systemd_linux.go b/cmd/lima-guestagent/install_systemd_linux.go
index d385df94..bc654a56 100644
--- a/cmd/lima-guestagent/install_systemd_linux.go
+++ b/cmd/lima-guestagent/install_systemd_linux.go
@@ -12,9 +12,10 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/lima-vm/lima/pkg/textutil"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/textutil"
 )
 
 func newInstallSystemdCommand() *cobra.Command {
diff --git a/cmd/lima-guestagent/main_linux.go b/cmd/lima-guestagent/main_linux.go
index dbaaf301..ac73b743 100644
--- a/cmd/lima-guestagent/main_linux.go
+++ b/cmd/lima-guestagent/main_linux.go
@@ -6,10 +6,11 @@ package main
 import (
 	"strings"
 
-	"github.com/lima-vm/lima/pkg/debugutil"
-	"github.com/lima-vm/lima/pkg/version"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/debugutil"
+	"github.com/lima-vm/lima/pkg/version"
 )
 
 func main() {
diff --git a/cmd/limactl/completion.go b/cmd/limactl/completion.go
index 5a01ed52..f69005b9 100644
--- a/cmd/limactl/completion.go
+++ b/cmd/limactl/completion.go
@@ -6,9 +6,10 @@ package main
 import (
 	"strings"
 
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/templatestore"
-	"github.com/spf13/cobra"
 )
 
 func bashCompleteInstanceNames(_ *cobra.Command) ([]string, cobra.ShellCompDirective) {
diff --git a/cmd/limactl/copy.go b/cmd/limactl/copy.go
index 8b4a138f..1f422d21 100644
--- a/cmd/limactl/copy.go
+++ b/cmd/limactl/copy.go
@@ -13,11 +13,12 @@ import (
 	"strings"
 
 	"github.com/coreos/go-semver/semver"
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/ioutilx"
 	"github.com/lima-vm/lima/pkg/sshutil"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 const copyHelp = `Copy files between host and guest
diff --git a/cmd/limactl/debug.go b/cmd/limactl/debug.go
index 124bcf4c..21bfef65 100644
--- a/cmd/limactl/debug.go
+++ b/cmd/limactl/debug.go
@@ -7,9 +7,10 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/lima-vm/lima/pkg/hostagent/dns"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/hostagent/dns"
 )
 
 func newDebugCommand() *cobra.Command {
diff --git a/cmd/limactl/delete.go b/cmd/limactl/delete.go
index 827555c9..40780356 100644
--- a/cmd/limactl/delete.go
+++ b/cmd/limactl/delete.go
@@ -9,12 +9,13 @@ import (
 	"os"
 	"runtime"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/autostart"
 	"github.com/lima-vm/lima/pkg/instance"
 	networks "github.com/lima-vm/lima/pkg/networks/reconcile"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newDeleteCommand() *cobra.Command {
diff --git a/cmd/limactl/disk.go b/cmd/limactl/disk.go
index db9788c4..cf95c016 100644
--- a/cmd/limactl/disk.go
+++ b/cmd/limactl/disk.go
@@ -15,12 +15,13 @@ import (
 	contfs "github.com/containerd/continuity/fs"
 	"github.com/docker/go-units"
 	"github.com/lima-vm/go-qcow2reader"
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/nativeimgutil"
 	"github.com/lima-vm/lima/pkg/qemu/imgutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newDiskCommand() *cobra.Command {
diff --git a/cmd/limactl/edit.go b/cmd/limactl/edit.go
index a411df71..33ee9581 100644
--- a/cmd/limactl/edit.go
+++ b/cmd/limactl/edit.go
@@ -10,6 +10,9 @@ import (
 	"os"
 	"path/filepath"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/cmd/limactl/editflags"
 	"github.com/lima-vm/lima/pkg/editutil"
 	"github.com/lima-vm/lima/pkg/instance"
@@ -19,8 +22,6 @@ import (
 	"github.com/lima-vm/lima/pkg/store/filenames"
 	"github.com/lima-vm/lima/pkg/uiutil"
 	"github.com/lima-vm/lima/pkg/yqutil"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newEditCommand() *cobra.Command {
diff --git a/cmd/limactl/factory-reset.go b/cmd/limactl/factory-reset.go
index a5303098..9d0add8f 100644
--- a/cmd/limactl/factory-reset.go
+++ b/cmd/limactl/factory-reset.go
@@ -9,12 +9,13 @@ import (
 	"path/filepath"
 	"strings"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/cidata"
 	"github.com/lima-vm/lima/pkg/instance"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newFactoryResetCommand() *cobra.Command {
diff --git a/cmd/limactl/genschema.go b/cmd/limactl/genschema.go
index d1be43ae..bb7f2236 100644
--- a/cmd/limactl/genschema.go
+++ b/cmd/limactl/genschema.go
@@ -10,12 +10,12 @@ import (
 	"os"
 
 	"github.com/invopop/jsonschema"
-	"github.com/lima-vm/lima/pkg/jsonschemautil"
-	"github.com/lima-vm/lima/pkg/limayaml"
+	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
 	orderedmap "github.com/wk8/go-ordered-map/v2"
 
-	"github.com/sirupsen/logrus"
+	"github.com/lima-vm/lima/pkg/jsonschemautil"
+	"github.com/lima-vm/lima/pkg/limayaml"
 )
 
 func newGenSchemaCommand() *cobra.Command {
diff --git a/cmd/limactl/hostagent.go b/cmd/limactl/hostagent.go
index ae02207d..d8506555 100644
--- a/cmd/limactl/hostagent.go
+++ b/cmd/limactl/hostagent.go
@@ -15,10 +15,11 @@ import (
 	"strconv"
 	"syscall"
 
-	"github.com/lima-vm/lima/pkg/hostagent"
-	"github.com/lima-vm/lima/pkg/hostagent/api/server"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/hostagent"
+	"github.com/lima-vm/lima/pkg/hostagent/api/server"
 )
 
 func newHostagentCommand() *cobra.Command {
diff --git a/cmd/limactl/info.go b/cmd/limactl/info.go
index 73ef5c1b..8ece9ab8 100644
--- a/cmd/limactl/info.go
+++ b/cmd/limactl/info.go
@@ -7,8 +7,9 @@ import (
 	"encoding/json"
 	"fmt"
 
-	"github.com/lima-vm/lima/pkg/limainfo"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/limainfo"
 )
 
 func newInfoCommand() *cobra.Command {
diff --git a/cmd/limactl/list.go b/cmd/limactl/list.go
index b55d96f7..20706ad9 100644
--- a/cmd/limactl/list.go
+++ b/cmd/limactl/list.go
@@ -12,10 +12,11 @@ import (
 	"strings"
 
 	"github.com/cheggaaa/pb/v3/termutil"
-	"github.com/lima-vm/lima/pkg/store"
 	"github.com/mattn/go-isatty"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/store"
 )
 
 func fieldNames() []string {
diff --git a/cmd/limactl/main.go b/cmd/limactl/main.go
index d56047f5..a006f0bb 100644
--- a/cmd/limactl/main.go
+++ b/cmd/limactl/main.go
@@ -11,14 +11,15 @@ import (
 	"runtime"
 	"strings"
 
+	"github.com/mattn/go-isatty"
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/debugutil"
 	"github.com/lima-vm/lima/pkg/fsutil"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/version"
-	"github.com/mattn/go-isatty"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 const (
diff --git a/cmd/limactl/protect.go b/cmd/limactl/protect.go
index 36140609..47e3e0a9 100644
--- a/cmd/limactl/protect.go
+++ b/cmd/limactl/protect.go
@@ -7,9 +7,10 @@ import (
 	"errors"
 	"fmt"
 
-	"github.com/lima-vm/lima/pkg/store"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/store"
 )
 
 func newProtectCommand() *cobra.Command {
diff --git a/cmd/limactl/prune.go b/cmd/limactl/prune.go
index b52f503d..76266aa0 100644
--- a/cmd/limactl/prune.go
+++ b/cmd/limactl/prune.go
@@ -7,12 +7,13 @@ import (
 	"maps"
 	"os"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/downloader"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/templatestore"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newPruneCommand() *cobra.Command {
diff --git a/cmd/limactl/restart.go b/cmd/limactl/restart.go
index 39fec1a1..f281aff9 100644
--- a/cmd/limactl/restart.go
+++ b/cmd/limactl/restart.go
@@ -4,9 +4,10 @@
 package main
 
 import (
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/instance"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/spf13/cobra"
 )
 
 func newRestartCommand() *cobra.Command {
diff --git a/cmd/limactl/shell.go b/cmd/limactl/shell.go
index 3aba8820..2c7498d6 100644
--- a/cmd/limactl/shell.go
+++ b/cmd/limactl/shell.go
@@ -14,16 +14,17 @@ import (
 
 	"al.essio.dev/pkg/shellescape"
 	"github.com/coreos/go-semver/semver"
+	"github.com/lima-vm/sshocker/pkg/ssh"
+	"github.com/mattn/go-isatty"
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/instance"
 	"github.com/lima-vm/lima/pkg/ioutilx"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	networks "github.com/lima-vm/lima/pkg/networks/reconcile"
 	"github.com/lima-vm/lima/pkg/sshutil"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/lima-vm/sshocker/pkg/ssh"
-	"github.com/mattn/go-isatty"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 const shellHelp = `Execute shell in Lima
diff --git a/cmd/limactl/show-ssh.go b/cmd/limactl/show-ssh.go
index b5103756..eb2a1de4 100644
--- a/cmd/limactl/show-ssh.go
+++ b/cmd/limactl/show-ssh.go
@@ -10,12 +10,13 @@ import (
 	"path/filepath"
 	"strings"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/sshutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 const showSSHExample = `
diff --git a/cmd/limactl/snapshot.go b/cmd/limactl/snapshot.go
index 30117c07..6f7e198c 100644
--- a/cmd/limactl/snapshot.go
+++ b/cmd/limactl/snapshot.go
@@ -8,11 +8,11 @@ import (
 	"fmt"
 	"strings"
 
-	"github.com/lima-vm/lima/pkg/snapshot"
-	"github.com/lima-vm/lima/pkg/store"
 	"github.com/sirupsen/logrus"
-
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/snapshot"
+	"github.com/lima-vm/lima/pkg/store"
 )
 
 func newSnapshotCommand() *cobra.Command {
diff --git a/cmd/limactl/start-at-login_unix.go b/cmd/limactl/start-at-login_unix.go
index 6b4b189d..e127caa3 100644
--- a/cmd/limactl/start-at-login_unix.go
+++ b/cmd/limactl/start-at-login_unix.go
@@ -10,10 +10,11 @@ import (
 	"os"
 	"runtime"
 
-	"github.com/lima-vm/lima/pkg/autostart"
-	"github.com/lima-vm/lima/pkg/store"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/autostart"
+	"github.com/lima-vm/lima/pkg/store"
 )
 
 func startAtLoginAction(cmd *cobra.Command, args []string) error {
diff --git a/cmd/limactl/start.go b/cmd/limactl/start.go
index 5187de60..ad053484 100644
--- a/cmd/limactl/start.go
+++ b/cmd/limactl/start.go
@@ -11,6 +11,9 @@ import (
 	"runtime"
 	"strings"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/cmd/limactl/editflags"
 	"github.com/lima-vm/lima/pkg/editutil"
 	"github.com/lima-vm/lima/pkg/instance"
@@ -22,8 +25,6 @@ import (
 	"github.com/lima-vm/lima/pkg/templatestore"
 	"github.com/lima-vm/lima/pkg/uiutil"
 	"github.com/lima-vm/lima/pkg/yqutil"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func registerCreateFlags(cmd *cobra.Command, commentPrefix string) {
diff --git a/cmd/limactl/stop.go b/cmd/limactl/stop.go
index 5a8c91ca..3f1ee6d2 100644
--- a/cmd/limactl/stop.go
+++ b/cmd/limactl/stop.go
@@ -4,10 +4,11 @@
 package main
 
 import (
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/instance"
 	networks "github.com/lima-vm/lima/pkg/networks/reconcile"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/spf13/cobra"
 )
 
 func newStopCommand() *cobra.Command {
diff --git a/cmd/limactl/sudoers.go b/cmd/limactl/sudoers.go
index 7478312e..49e28cc2 100644
--- a/cmd/limactl/sudoers.go
+++ b/cmd/limactl/sudoers.go
@@ -6,8 +6,9 @@ package main
 import (
 	"fmt"
 
-	"github.com/lima-vm/lima/pkg/networks"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/networks"
 )
 
 const socketVMNetURL = "https://lima-vm.io/docs/config/network/vmnet/#socket_vmnet"
diff --git a/cmd/limactl/sudoers_darwin.go b/cmd/limactl/sudoers_darwin.go
index 96fb265b..af26cb7a 100644
--- a/cmd/limactl/sudoers_darwin.go
+++ b/cmd/limactl/sudoers_darwin.go
@@ -8,9 +8,10 @@ import (
 	"fmt"
 	"io"
 
-	"github.com/lima-vm/lima/pkg/networks"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/networks"
 )
 
 func sudoersAction(cmd *cobra.Command, args []string) error {
diff --git a/cmd/limactl/template.go b/cmd/limactl/template.go
index 73d22b0b..fbbb945c 100644
--- a/cmd/limactl/template.go
+++ b/cmd/limactl/template.go
@@ -9,12 +9,13 @@ import (
 	"os"
 	"path/filepath"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/limatmpl"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/yqutil"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 func newTemplateCommand() *cobra.Command {
diff --git a/cmd/limactl/tunnel.go b/cmd/limactl/tunnel.go
index 9e690281..45137617 100644
--- a/cmd/limactl/tunnel.go
+++ b/cmd/limactl/tunnel.go
@@ -11,11 +11,12 @@ import (
 	"runtime"
 	"strconv"
 
+	"github.com/sirupsen/logrus"
+	"github.com/spf13/cobra"
+
 	"github.com/lima-vm/lima/pkg/freeport"
 	"github.com/lima-vm/lima/pkg/sshutil"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/sirupsen/logrus"
-	"github.com/spf13/cobra"
 )
 
 const tunnelHelp = `Create a tunnel for Lima
diff --git a/cmd/limactl/unprotect.go b/cmd/limactl/unprotect.go
index 5cb9b303..72629678 100644
--- a/cmd/limactl/unprotect.go
+++ b/cmd/limactl/unprotect.go
@@ -7,9 +7,10 @@ import (
 	"errors"
 	"fmt"
 
-	"github.com/lima-vm/lima/pkg/store"
 	"github.com/sirupsen/logrus"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/store"
 )
 
 func newUnprotectCommand() *cobra.Command {
diff --git a/cmd/limactl/usernet.go b/cmd/limactl/usernet.go
index 66cf06cf..8a6854a7 100644
--- a/cmd/limactl/usernet.go
+++ b/cmd/limactl/usernet.go
@@ -9,8 +9,9 @@ import (
 	"os"
 	"strconv"
 
-	"github.com/lima-vm/lima/pkg/networks/usernet"
 	"github.com/spf13/cobra"
+
+	"github.com/lima-vm/lima/pkg/networks/usernet"
 )
 
 func newUsernetCommand() *cobra.Command {
diff --git a/pkg/cidata/cidata.go b/pkg/cidata/cidata.go
index 0b52e26f..dba3cbc9 100644
--- a/pkg/cidata/cidata.go
+++ b/pkg/cidata/cidata.go
@@ -20,6 +20,8 @@ import (
 	"time"
 
 	"github.com/docker/go-units"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/debugutil"
 	instance "github.com/lima-vm/lima/pkg/instance/hostname"
 	"github.com/lima-vm/lima/pkg/iso9660util"
@@ -30,7 +32,6 @@ import (
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/sshutil"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 var netLookupIP = func(host string) []net.IP {
diff --git a/pkg/cidata/template.go b/pkg/cidata/template.go
index 70cba120..2874c1c4 100644
--- a/pkg/cidata/template.go
+++ b/pkg/cidata/template.go
@@ -11,9 +11,9 @@ import (
 	"io/fs"
 	"path"
 
-	"github.com/lima-vm/lima/pkg/iso9660util"
-
 	"github.com/containerd/containerd/identifiers"
+
+	"github.com/lima-vm/lima/pkg/iso9660util"
 	"github.com/lima-vm/lima/pkg/textutil"
 )
 
diff --git a/pkg/downloader/downloader.go b/pkg/downloader/downloader.go
index 785261ea..ce136d65 100644
--- a/pkg/downloader/downloader.go
+++ b/pkg/downloader/downloader.go
@@ -21,12 +21,13 @@ import (
 
 	"github.com/cheggaaa/pb/v3"
 	"github.com/containerd/continuity/fs"
+	"github.com/opencontainers/go-digest"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/httpclientutil"
 	"github.com/lima-vm/lima/pkg/localpathutil"
 	"github.com/lima-vm/lima/pkg/lockutil"
 	"github.com/lima-vm/lima/pkg/progressbar"
-	"github.com/opencontainers/go-digest"
-	"github.com/sirupsen/logrus"
 )
 
 // HideProgress is used only for testing.
diff --git a/pkg/editutil/editutil.go b/pkg/editutil/editutil.go
index a8a172cd..ffef4dfe 100644
--- a/pkg/editutil/editutil.go
+++ b/pkg/editutil/editutil.go
@@ -11,10 +11,11 @@ import (
 	"path/filepath"
 	"strings"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/editutil/editorcmd"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 func fileWarning(filename string) string {
diff --git a/pkg/fileutils/download.go b/pkg/fileutils/download.go
index bb54604e..a2f40777 100644
--- a/pkg/fileutils/download.go
+++ b/pkg/fileutils/download.go
@@ -9,9 +9,10 @@ import (
 	"fmt"
 	"path"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/downloader"
 	"github.com/lima-vm/lima/pkg/limayaml"
-	"github.com/sirupsen/logrus"
 )
 
 // ErrSkipped is returned when the downloader did not attempt to download the specified file.
diff --git a/pkg/guestagent/api/client/client.go b/pkg/guestagent/api/client/client.go
index 934d1534..544123a5 100644
--- a/pkg/guestagent/api/client/client.go
+++ b/pkg/guestagent/api/client/client.go
@@ -8,10 +8,11 @@ import (
 	"math"
 	"net"
 
-	"github.com/lima-vm/lima/pkg/guestagent/api"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/resolver"
 	"google.golang.org/protobuf/types/known/emptypb"
+
+	"github.com/lima-vm/lima/pkg/guestagent/api"
 )
 
 type GuestAgentClient struct {
diff --git a/pkg/guestagent/api/server/server.go b/pkg/guestagent/api/server/server.go
index 84018613..b8f6e249 100644
--- a/pkg/guestagent/api/server/server.go
+++ b/pkg/guestagent/api/server/server.go
@@ -7,11 +7,12 @@ import (
 	"context"
 	"net"
 
+	"google.golang.org/grpc"
+	"google.golang.org/protobuf/types/known/emptypb"
+
 	"github.com/lima-vm/lima/pkg/guestagent"
 	"github.com/lima-vm/lima/pkg/guestagent/api"
 	"github.com/lima-vm/lima/pkg/portfwdserver"
-	"google.golang.org/grpc"
-	"google.golang.org/protobuf/types/known/emptypb"
 )
 
 func StartServer(lis net.Listener, guest *GuestServer) error {
diff --git a/pkg/guestagent/guestagent_linux.go b/pkg/guestagent/guestagent_linux.go
index f64a672e..2013c611 100644
--- a/pkg/guestagent/guestagent_linux.go
+++ b/pkg/guestagent/guestagent_linux.go
@@ -14,13 +14,14 @@ import (
 
 	"github.com/elastic/go-libaudit/v2"
 	"github.com/elastic/go-libaudit/v2/auparse"
+	"github.com/sirupsen/logrus"
+	"google.golang.org/protobuf/types/known/timestamppb"
+
 	"github.com/lima-vm/lima/pkg/guestagent/api"
 	"github.com/lima-vm/lima/pkg/guestagent/iptables"
 	"github.com/lima-vm/lima/pkg/guestagent/kubernetesservice"
 	"github.com/lima-vm/lima/pkg/guestagent/procnettcp"
 	"github.com/lima-vm/lima/pkg/guestagent/timesync"
-	"github.com/sirupsen/logrus"
-	"google.golang.org/protobuf/types/known/timestamppb"
 )
 
 func New(newTicker func() (<-chan time.Time, func()), iptablesIdle time.Duration) (Agent, error) {
diff --git a/pkg/hostagent/events/watcher.go b/pkg/hostagent/events/watcher.go
index 8d1fca47..303afe2b 100644
--- a/pkg/hostagent/events/watcher.go
+++ b/pkg/hostagent/events/watcher.go
@@ -9,9 +9,10 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/lima-vm/lima/pkg/logrusutil"
 	"github.com/nxadm/tail"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/logrusutil"
 )
 
 func Watch(ctx context.Context, haStdoutPath, haStderrPath string, begin time.Time, onEvent func(Event) bool) error {
diff --git a/pkg/hostagent/hostagent.go b/pkg/hostagent/hostagent.go
index 921caa12..ee8b42bd 100644
--- a/pkg/hostagent/hostagent.go
+++ b/pkg/hostagent/hostagent.go
@@ -19,6 +19,9 @@ import (
 	"sync"
 	"time"
 
+	"github.com/lima-vm/sshocker/pkg/ssh"
+	"github.com/sethvargo/go-password/password"
+	"github.com/sirupsen/logrus"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"
 
@@ -39,9 +42,6 @@ import (
 	"github.com/lima-vm/lima/pkg/sshutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/lima-vm/sshocker/pkg/ssh"
-	"github.com/sethvargo/go-password/password"
-	"github.com/sirupsen/logrus"
 )
 
 type HostAgent struct {
diff --git a/pkg/hostagent/inotify.go b/pkg/hostagent/inotify.go
index 374e3408..10bb2a4b 100644
--- a/pkg/hostagent/inotify.go
+++ b/pkg/hostagent/inotify.go
@@ -10,10 +10,11 @@ import (
 	"path/filepath"
 	"strings"
 
-	guestagentapi "github.com/lima-vm/lima/pkg/guestagent/api"
 	"github.com/rjeczalik/notify"
 	"github.com/sirupsen/logrus"
 	"google.golang.org/protobuf/types/known/timestamppb"
+
+	guestagentapi "github.com/lima-vm/lima/pkg/guestagent/api"
 )
 
 const CacheSize = 10000
diff --git a/pkg/hostagent/mount.go b/pkg/hostagent/mount.go
index 877d759f..5992a510 100644
--- a/pkg/hostagent/mount.go
+++ b/pkg/hostagent/mount.go
@@ -9,10 +9,11 @@ import (
 	"os"
 	"runtime"
 
-	"github.com/lima-vm/lima/pkg/ioutilx"
-	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/sshocker/pkg/reversesshfs"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/ioutilx"
+	"github.com/lima-vm/lima/pkg/limayaml"
 )
 
 type mount struct {
diff --git a/pkg/hostagent/port.go b/pkg/hostagent/port.go
index 040d7594..805e9cbd 100644
--- a/pkg/hostagent/port.go
+++ b/pkg/hostagent/port.go
@@ -7,10 +7,11 @@ import (
 	"context"
 	"net"
 
-	"github.com/lima-vm/lima/pkg/guestagent/api"
-	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/sshocker/pkg/ssh"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/guestagent/api"
+	"github.com/lima-vm/lima/pkg/limayaml"
 )
 
 type portForwarder struct {
diff --git a/pkg/hostagent/port_darwin.go b/pkg/hostagent/port_darwin.go
index 5ac63b41..87bdb271 100644
--- a/pkg/hostagent/port_darwin.go
+++ b/pkg/hostagent/port_darwin.go
@@ -12,10 +12,11 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/lima-vm/lima/pkg/bicopy"
-	"github.com/lima-vm/lima/pkg/portfwd"
 	"github.com/lima-vm/sshocker/pkg/ssh"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/bicopy"
+	"github.com/lima-vm/lima/pkg/portfwd"
 )
 
 // forwardTCP is not thread-safe.
diff --git a/pkg/hostagent/requirements.go b/pkg/hostagent/requirements.go
index 7d8f24f3..f57e495e 100644
--- a/pkg/hostagent/requirements.go
+++ b/pkg/hostagent/requirements.go
@@ -9,9 +9,10 @@ import (
 	"strings"
 	"time"
 
-	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/sshocker/pkg/ssh"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/limayaml"
 )
 
 func (a *HostAgent) waitForRequirements(label string, requirements []requirement) error {
diff --git a/pkg/instance/ansible.go b/pkg/instance/ansible.go
index e2fa1c4f..36af0f8c 100644
--- a/pkg/instance/ansible.go
+++ b/pkg/instance/ansible.go
@@ -11,10 +11,11 @@ import (
 	"path/filepath"
 
 	"github.com/goccy/go-yaml"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 func runAnsibleProvision(ctx context.Context, inst *store.Instance) error {
diff --git a/pkg/instance/restart.go b/pkg/instance/restart.go
index 04656f04..c63c2e40 100644
--- a/pkg/instance/restart.go
+++ b/pkg/instance/restart.go
@@ -6,9 +6,10 @@ package instance
 import (
 	"context"
 
+	"github.com/sirupsen/logrus"
+
 	networks "github.com/lima-vm/lima/pkg/networks/reconcile"
 	"github.com/lima-vm/lima/pkg/store"
-	"github.com/sirupsen/logrus"
 )
 
 const launchHostAgentForeground = false
diff --git a/pkg/instance/start.go b/pkg/instance/start.go
index 9144d9af..1df00c78 100644
--- a/pkg/instance/start.go
+++ b/pkg/instance/start.go
@@ -18,22 +18,22 @@ import (
 
 	"github.com/docker/go-units"
 	"github.com/lima-vm/go-qcow2reader"
-	"github.com/lima-vm/lima/pkg/driver"
-	"github.com/lima-vm/lima/pkg/driverutil"
-	"github.com/lima-vm/lima/pkg/executil"
-	"github.com/lima-vm/lima/pkg/nativeimgutil"
-	"github.com/lima-vm/lima/pkg/osutil"
-	"github.com/lima-vm/lima/pkg/qemu/imgutil"
-	"github.com/lima-vm/lima/pkg/usrlocalsharelima"
 	"github.com/mattn/go-isatty"
+	"github.com/sirupsen/logrus"
 
 	"github.com/lima-vm/lima/pkg/downloader"
+	"github.com/lima-vm/lima/pkg/driver"
+	"github.com/lima-vm/lima/pkg/driverutil"
+	"github.com/lima-vm/lima/pkg/executil"
 	"github.com/lima-vm/lima/pkg/fileutils"
 	hostagentevents "github.com/lima-vm/lima/pkg/hostagent/events"
 	"github.com/lima-vm/lima/pkg/limayaml"
+	"github.com/lima-vm/lima/pkg/nativeimgutil"
+	"github.com/lima-vm/lima/pkg/osutil"
+	"github.com/lima-vm/lima/pkg/qemu/imgutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
+	"github.com/lima-vm/lima/pkg/usrlocalsharelima"
 )
 
 // DefaultWatchHostAgentEventsTimeout is the duration to wait for the instance
diff --git a/pkg/instance/stop.go b/pkg/instance/stop.go
index 12b624ed..60b8d9b3 100644
--- a/pkg/instance/stop.go
+++ b/pkg/instance/stop.go
@@ -12,11 +12,12 @@ import (
 	"strings"
 	"time"
 
+	"github.com/sirupsen/logrus"
+
 	hostagentevents "github.com/lima-vm/lima/pkg/hostagent/events"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 func StopGracefully(ctx context.Context, inst *store.Instance, isRestart bool) error {
diff --git a/pkg/limainfo/limainfo.go b/pkg/limainfo/limainfo.go
index 89a646ec..5311cca2 100644
--- a/pkg/limainfo/limainfo.go
+++ b/pkg/limainfo/limainfo.go
@@ -7,13 +7,14 @@ import (
 	"errors"
 	"io/fs"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/driverutil"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/templatestore"
 	"github.com/lima-vm/lima/pkg/usrlocalsharelima"
 	"github.com/lima-vm/lima/pkg/version"
-	"github.com/sirupsen/logrus"
 )
 
 type LimaInfo struct {
diff --git a/pkg/limatmpl/embed.go b/pkg/limatmpl/embed.go
index 202174f5..1a0d9d89 100644
--- a/pkg/limatmpl/embed.go
+++ b/pkg/limatmpl/embed.go
@@ -16,12 +16,13 @@ import (
 	"unicode"
 
 	"github.com/coreos/go-semver/semver"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
 	"github.com/lima-vm/lima/pkg/version/versionutil"
 	"github.com/lima-vm/lima/pkg/yqutil"
-	"github.com/sirupsen/logrus"
 )
 
 // Embed will recursively resolve all "base" dependencies and update the
diff --git a/pkg/limatmpl/locator.go b/pkg/limatmpl/locator.go
index 218311af..6f952b20 100644
--- a/pkg/limatmpl/locator.go
+++ b/pkg/limatmpl/locator.go
@@ -17,10 +17,11 @@ import (
 	"strings"
 
 	"github.com/containerd/containerd/identifiers"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/ioutilx"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/templatestore"
-	"github.com/sirupsen/logrus"
 )
 
 const yBytesLimit = 4 * 1024 * 1024 // 4MiB
diff --git a/pkg/limayaml/defaults.go b/pkg/limayaml/defaults.go
index 047e1d1f..2351287a 100644
--- a/pkg/limayaml/defaults.go
+++ b/pkg/limayaml/defaults.go
@@ -24,6 +24,10 @@ import (
 	"github.com/coreos/go-semver/semver"
 	"github.com/docker/go-units"
 	"github.com/goccy/go-yaml"
+	"github.com/pbnjay/memory"
+	"github.com/sirupsen/logrus"
+	"golang.org/x/sys/cpu"
+
 	instance "github.com/lima-vm/lima/pkg/instance/hostname"
 	"github.com/lima-vm/lima/pkg/ioutilx"
 	"github.com/lima-vm/lima/pkg/localpathutil"
@@ -35,9 +39,6 @@ import (
 	"github.com/lima-vm/lima/pkg/store/filenames"
 	"github.com/lima-vm/lima/pkg/version"
 	"github.com/lima-vm/lima/pkg/version/versionutil"
-	"github.com/pbnjay/memory"
-	"github.com/sirupsen/logrus"
-	"golang.org/x/sys/cpu"
 )
 
 const (
diff --git a/pkg/limayaml/load.go b/pkg/limayaml/load.go
index 87cb4890..13f71e8d 100644
--- a/pkg/limayaml/load.go
+++ b/pkg/limayaml/load.go
@@ -9,9 +9,10 @@ import (
 	"os"
 	"path/filepath"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 // Load loads the yaml and fulfills unspecified fields with the default values.
diff --git a/pkg/limayaml/marshal.go b/pkg/limayaml/marshal.go
index 70caee2f..22c42f02 100644
--- a/pkg/limayaml/marshal.go
+++ b/pkg/limayaml/marshal.go
@@ -7,8 +7,9 @@ import (
 	"fmt"
 
 	"github.com/goccy/go-yaml"
-	"github.com/lima-vm/lima/pkg/yqutil"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/yqutil"
 )
 
 const (
diff --git a/pkg/limayaml/validate.go b/pkg/limayaml/validate.go
index 42c4faa5..eeef301c 100644
--- a/pkg/limayaml/validate.go
+++ b/pkg/limayaml/validate.go
@@ -20,12 +20,13 @@ import (
 	"github.com/containerd/containerd/identifiers"
 	"github.com/coreos/go-semver/semver"
 	"github.com/docker/go-units"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/localpathutil"
 	"github.com/lima-vm/lima/pkg/networks"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/version"
 	"github.com/lima-vm/lima/pkg/version/versionutil"
-	"github.com/sirupsen/logrus"
 )
 
 func validateFileObject(f File, fieldName string) error {
diff --git a/pkg/nativeimgutil/nativeimgutil.go b/pkg/nativeimgutil/nativeimgutil.go
index 52dcf2eb..094a5571 100644
--- a/pkg/nativeimgutil/nativeimgutil.go
+++ b/pkg/nativeimgutil/nativeimgutil.go
@@ -18,8 +18,9 @@ import (
 	"github.com/lima-vm/go-qcow2reader/convert"
 	"github.com/lima-vm/go-qcow2reader/image/qcow2"
 	"github.com/lima-vm/go-qcow2reader/image/raw"
-	"github.com/lima-vm/lima/pkg/progressbar"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/progressbar"
 )
 
 // Disk image size must be aigned to sector size. Qemu block layer is rounding
diff --git a/pkg/networks/config.go b/pkg/networks/config.go
index 984a7a51..033231c9 100644
--- a/pkg/networks/config.go
+++ b/pkg/networks/config.go
@@ -13,10 +13,11 @@ import (
 	"sync"
 
 	"github.com/goccy/go-yaml"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
 	"github.com/lima-vm/lima/pkg/textutil"
-	"github.com/sirupsen/logrus"
 )
 
 //go:embed networks.TEMPLATE.yaml
diff --git a/pkg/networks/reconcile/reconcile.go b/pkg/networks/reconcile/reconcile.go
index 35c269ef..f0f383a0 100644
--- a/pkg/networks/reconcile/reconcile.go
+++ b/pkg/networks/reconcile/reconcile.go
@@ -14,12 +14,13 @@ import (
 	"sync"
 	"time"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/networks"
 	"github.com/lima-vm/lima/pkg/networks/usernet"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
-	"github.com/sirupsen/logrus"
 )
 
 func Reconcile(ctx context.Context, newInst string) error {
diff --git a/pkg/networks/usernet/client.go b/pkg/networks/usernet/client.go
index 014b9397..2296f103 100644
--- a/pkg/networks/usernet/client.go
+++ b/pkg/networks/usernet/client.go
@@ -16,6 +16,7 @@ import (
 
 	gvproxyclient "github.com/containers/gvisor-tap-vsock/pkg/client"
 	"github.com/containers/gvisor-tap-vsock/pkg/types"
+
 	"github.com/lima-vm/lima/pkg/driver"
 	"github.com/lima-vm/lima/pkg/httpclientutil"
 	"github.com/lima-vm/lima/pkg/limayaml"
diff --git a/pkg/networks/usernet/config.go b/pkg/networks/usernet/config.go
index 76940d60..fe97232d 100644
--- a/pkg/networks/usernet/config.go
+++ b/pkg/networks/usernet/config.go
@@ -9,6 +9,7 @@ import (
 	"path/filepath"
 
 	"github.com/apparentlymart/go-cidr/cidr"
+
 	"github.com/lima-vm/lima/pkg/networks"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
diff --git a/pkg/networks/usernet/recoincile.go b/pkg/networks/usernet/recoincile.go
index 7304e724..a85bc81c 100644
--- a/pkg/networks/usernet/recoincile.go
+++ b/pkg/networks/usernet/recoincile.go
@@ -16,11 +16,12 @@ import (
 	"strings"
 	"time"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/executil"
 	"github.com/lima-vm/lima/pkg/lockutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
-	"github.com/sirupsen/logrus"
 )
 
 // Start starts a instance a usernet network with the given name.
diff --git a/pkg/osutil/user.go b/pkg/osutil/user.go
index 8b09091f..1ff1c02a 100644
--- a/pkg/osutil/user.go
+++ b/pkg/osutil/user.go
@@ -13,9 +13,10 @@ import (
 	"strings"
 	"sync"
 
+	"github.com/sirupsen/logrus"
+
 	. "github.com/lima-vm/lima/pkg/must"
 	"github.com/lima-vm/lima/pkg/version/versionutil"
-	"github.com/sirupsen/logrus"
 )
 
 type User struct {
diff --git a/pkg/portfwd/client.go b/pkg/portfwd/client.go
index 1c24c069..d76bfe9e 100644
--- a/pkg/portfwd/client.go
+++ b/pkg/portfwd/client.go
@@ -10,10 +10,11 @@ import (
 	"time"
 
 	"github.com/containers/gvisor-tap-vsock/pkg/services/forwarder"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/bicopy"
 	"github.com/lima-vm/lima/pkg/guestagent/api"
 	guestagentclient "github.com/lima-vm/lima/pkg/guestagent/api/client"
-	"github.com/sirupsen/logrus"
 )
 
 func HandleTCPConnection(ctx context.Context, client *guestagentclient.GuestAgentClient, conn net.Conn, guestAddr string) {
diff --git a/pkg/portfwd/forward.go b/pkg/portfwd/forward.go
index 846fb98b..7d6c001c 100644
--- a/pkg/portfwd/forward.go
+++ b/pkg/portfwd/forward.go
@@ -8,10 +8,11 @@ import (
 	"net"
 	"strings"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/guestagent/api"
 	guestagentclient "github.com/lima-vm/lima/pkg/guestagent/api/client"
 	"github.com/lima-vm/lima/pkg/limayaml"
-	"github.com/sirupsen/logrus"
 )
 
 var IPv4loopback1 = limayaml.IPv4loopback1
diff --git a/pkg/portfwd/listener.go b/pkg/portfwd/listener.go
index edd798f0..e4b250dd 100644
--- a/pkg/portfwd/listener.go
+++ b/pkg/portfwd/listener.go
@@ -10,8 +10,9 @@ import (
 	"strings"
 	"sync"
 
-	guestagentclient "github.com/lima-vm/lima/pkg/guestagent/api/client"
 	"github.com/sirupsen/logrus"
+
+	guestagentclient "github.com/lima-vm/lima/pkg/guestagent/api/client"
 )
 
 type ClosableListeners struct {
diff --git a/pkg/qemu/entitlementutil/entitlementutil.go b/pkg/qemu/entitlementutil/entitlementutil.go
index 63eda14f..6555095d 100644
--- a/pkg/qemu/entitlementutil/entitlementutil.go
+++ b/pkg/qemu/entitlementutil/entitlementutil.go
@@ -10,10 +10,10 @@ import (
 	"os/exec"
 	"strings"
 
-	"github.com/lima-vm/lima/pkg/uiutil"
-
 	"github.com/mattn/go-isatty"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/uiutil"
 )
 
 // IsSigned returns an error if the binary is not signed, or the sign is invalid,
diff --git a/pkg/qemu/qemu.go b/pkg/qemu/qemu.go
index 12e148bf..ca775b2d 100644
--- a/pkg/qemu/qemu.go
+++ b/pkg/qemu/qemu.go
@@ -20,22 +20,22 @@ import (
 	"strings"
 	"time"
 
-	"github.com/lima-vm/lima/pkg/networks/usernet"
-	"github.com/lima-vm/lima/pkg/osutil"
-
 	"github.com/coreos/go-semver/semver"
 	"github.com/digitalocean/go-qemu/qmp"
 	"github.com/digitalocean/go-qemu/qmp/raw"
 	"github.com/docker/go-units"
+	"github.com/mattn/go-shellwords"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/fileutils"
 	"github.com/lima-vm/lima/pkg/iso9660util"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/networks"
+	"github.com/lima-vm/lima/pkg/networks/usernet"
+	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/qemu/imgutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/mattn/go-shellwords"
-	"github.com/sirupsen/logrus"
 )
 
 type Config struct {
diff --git a/pkg/qemu/qemu_driver.go b/pkg/qemu/qemu_driver.go
index 7ec1fc2b..e28b2342 100644
--- a/pkg/qemu/qemu_driver.go
+++ b/pkg/qemu/qemu_driver.go
@@ -24,6 +24,8 @@ import (
 	"github.com/coreos/go-semver/semver"
 	"github.com/digitalocean/go-qemu/qmp"
 	"github.com/digitalocean/go-qemu/qmp/raw"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/driver"
 	"github.com/lima-vm/lima/pkg/executil"
 	"github.com/lima-vm/lima/pkg/limayaml"
@@ -32,7 +34,6 @@ import (
 	"github.com/lima-vm/lima/pkg/qemu/entitlementutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 type LimaQemuDriver struct {
diff --git a/pkg/sshutil/sshutil.go b/pkg/sshutil/sshutil.go
index 0bf390b3..81e81e37 100644
--- a/pkg/sshutil/sshutil.go
+++ b/pkg/sshutil/sshutil.go
@@ -20,14 +20,15 @@ import (
 	"time"
 
 	"github.com/coreos/go-semver/semver"
+	"github.com/mattn/go-shellwords"
+	"github.com/sirupsen/logrus"
+	"golang.org/x/sys/cpu"
+
 	"github.com/lima-vm/lima/pkg/ioutilx"
 	"github.com/lima-vm/lima/pkg/lockutil"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/mattn/go-shellwords"
-	"github.com/sirupsen/logrus"
-	"golang.org/x/sys/cpu"
 )
 
 // Environment variable that allows configuring the command (alias) to execute
diff --git a/pkg/store/disk.go b/pkg/store/disk.go
index a9bc102c..0b5b1224 100644
--- a/pkg/store/disk.go
+++ b/pkg/store/disk.go
@@ -11,6 +11,7 @@ import (
 	"path/filepath"
 
 	"github.com/lima-vm/go-qcow2reader"
+
 	"github.com/lima-vm/lima/pkg/store/filenames"
 )
 
diff --git a/pkg/store/instance.go b/pkg/store/instance.go
index c8f71b8a..b9748c9b 100644
--- a/pkg/store/instance.go
+++ b/pkg/store/instance.go
@@ -19,6 +19,8 @@ import (
 	"time"
 
 	"github.com/docker/go-units"
+	"github.com/sirupsen/logrus"
+
 	hostagentclient "github.com/lima-vm/lima/pkg/hostagent/api/client"
 	instancehostname "github.com/lima-vm/lima/pkg/instance/hostname"
 	"github.com/lima-vm/lima/pkg/limayaml"
@@ -26,7 +28,6 @@ import (
 	"github.com/lima-vm/lima/pkg/store/filenames"
 	"github.com/lima-vm/lima/pkg/textutil"
 	"github.com/lima-vm/lima/pkg/version/versionutil"
-	"github.com/sirupsen/logrus"
 )
 
 type Status = string
diff --git a/pkg/store/store.go b/pkg/store/store.go
index 58669dd7..10561463 100644
--- a/pkg/store/store.go
+++ b/pkg/store/store.go
@@ -11,6 +11,7 @@ import (
 	"strings"
 
 	"github.com/containerd/containerd/identifiers"
+
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
diff --git a/pkg/usrlocalsharelima/usrlocalsharelima.go b/pkg/usrlocalsharelima/usrlocalsharelima.go
index 8ad5cf66..51fd4a19 100644
--- a/pkg/usrlocalsharelima/usrlocalsharelima.go
+++ b/pkg/usrlocalsharelima/usrlocalsharelima.go
@@ -13,9 +13,10 @@ import (
 	"runtime"
 	"sync"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/debugutil"
 	"github.com/lima-vm/lima/pkg/limayaml"
-	"github.com/sirupsen/logrus"
 )
 
 // executableViaArgs0 returns the absolute path to the executable used to start this process.
diff --git a/pkg/vz/disk.go b/pkg/vz/disk.go
index 596bc1ba..3fff17c4 100644
--- a/pkg/vz/disk.go
+++ b/pkg/vz/disk.go
@@ -11,6 +11,7 @@ import (
 	"path/filepath"
 
 	"github.com/docker/go-units"
+
 	"github.com/lima-vm/lima/pkg/driver"
 	"github.com/lima-vm/lima/pkg/fileutils"
 	"github.com/lima-vm/lima/pkg/iso9660util"
diff --git a/pkg/vz/network_darwin.go b/pkg/vz/network_darwin.go
index 39f0cb90..cb31e8f7 100644
--- a/pkg/vz/network_darwin.go
+++ b/pkg/vz/network_darwin.go
@@ -16,7 +16,6 @@ import (
 	"time"
 
 	"github.com/balajiv113/fd"
-
 	"github.com/sirupsen/logrus"
 )
 
diff --git a/pkg/vz/rosetta_directory_share_arm64.go b/pkg/vz/rosetta_directory_share_arm64.go
index a692dc9f..6e7fdbfe 100644
--- a/pkg/vz/rosetta_directory_share_arm64.go
+++ b/pkg/vz/rosetta_directory_share_arm64.go
@@ -10,8 +10,9 @@ import (
 
 	"github.com/Code-Hex/vz/v3"
 	"github.com/coreos/go-semver/semver"
-	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/sirupsen/logrus"
+
+	"github.com/lima-vm/lima/pkg/osutil"
 )
 
 func createRosettaDirectoryShareConfiguration() (*vz.VirtioFileSystemDeviceConfiguration, error) {
diff --git a/pkg/vz/vm_darwin.go b/pkg/vz/vm_darwin.go
index 407af20c..1f21cf44 100644
--- a/pkg/vz/vm_darwin.go
+++ b/pkg/vz/vm_darwin.go
@@ -22,6 +22,8 @@ import (
 	"github.com/docker/go-units"
 	"github.com/lima-vm/go-qcow2reader"
 	"github.com/lima-vm/go-qcow2reader/image/raw"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/driver"
 	"github.com/lima-vm/lima/pkg/iso9660util"
 	"github.com/lima-vm/lima/pkg/limayaml"
@@ -31,7 +33,6 @@ import (
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 // diskImageCachingMode is set to DiskImageCachingModeCached so as to avoid disk corruption on ARM:
diff --git a/pkg/vz/vz_driver_darwin.go b/pkg/vz/vz_driver_darwin.go
index c131e3c1..812eaeb6 100644
--- a/pkg/vz/vz_driver_darwin.go
+++ b/pkg/vz/vz_driver_darwin.go
@@ -16,7 +16,6 @@ import (
 
 	"github.com/Code-Hex/vz/v3"
 	"github.com/coreos/go-semver/semver"
-
 	"github.com/sirupsen/logrus"
 
 	"github.com/lima-vm/lima/pkg/driver"
diff --git a/pkg/wsl2/fs.go b/pkg/wsl2/fs.go
index c116396d..8a3060ac 100644
--- a/pkg/wsl2/fs.go
+++ b/pkg/wsl2/fs.go
@@ -9,10 +9,11 @@ import (
 	"os"
 	"path/filepath"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/driver"
 	"github.com/lima-vm/lima/pkg/fileutils"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
 )
 
 // EnsureFs downloads the root fs.
diff --git a/pkg/wsl2/vm_windows.go b/pkg/wsl2/vm_windows.go
index d0b537e3..531de6c0 100644
--- a/pkg/wsl2/vm_windows.go
+++ b/pkg/wsl2/vm_windows.go
@@ -13,11 +13,12 @@ import (
 	"strconv"
 	"strings"
 
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/executil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/store/filenames"
 	"github.com/lima-vm/lima/pkg/textutil"
-	"github.com/sirupsen/logrus"
 )
 
 // startVM calls WSL to start a VM.
diff --git a/pkg/wsl2/wsl_driver_windows.go b/pkg/wsl2/wsl_driver_windows.go
index 318f80b3..479aaf0f 100644
--- a/pkg/wsl2/wsl_driver_windows.go
+++ b/pkg/wsl2/wsl_driver_windows.go
@@ -11,13 +11,14 @@ import (
 
 	"github.com/Microsoft/go-winio"
 	"github.com/Microsoft/go-winio/pkg/guid"
+	"github.com/sirupsen/logrus"
+
 	"github.com/lima-vm/lima/pkg/driver"
 	"github.com/lima-vm/lima/pkg/freeport"
 	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/lima-vm/lima/pkg/reflectutil"
 	"github.com/lima-vm/lima/pkg/store"
 	"github.com/lima-vm/lima/pkg/windows"
-	"github.com/sirupsen/logrus"
 )
 
 var knownYamlProperties = []string{



Test patch:
diff --git a/pkg/cidata/cidata_test.go b/pkg/cidata/cidata_test.go
index 1e3fafc5..49945652 100644
--- a/pkg/cidata/cidata_test.go
+++ b/pkg/cidata/cidata_test.go
@@ -9,9 +9,9 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/networks"
-
 	"gotest.tools/v3/assert"
+
+	"github.com/lima-vm/lima/pkg/networks"
 )
 
 func fakeLookupIP(_ string) []net.IP {
diff --git a/pkg/instance/hostname/hostname_test.go b/pkg/instance/hostname/hostname_test.go
index 69620638..8173d62d 100644
--- a/pkg/instance/hostname/hostname_test.go
+++ b/pkg/instance/hostname/hostname_test.go
@@ -6,8 +6,9 @@ package instance_test
 import (
 	"testing"
 
-	instance "github.com/lima-vm/lima/pkg/instance/hostname"
 	"gotest.tools/v3/assert"
+
+	instance "github.com/lima-vm/lima/pkg/instance/hostname"
 )
 
 func TestHostnameFromInstName(t *testing.T) {
diff --git a/pkg/limatmpl/embed_test.go b/pkg/limatmpl/embed_test.go
index e1db9ba2..4fa2db58 100644
--- a/pkg/limatmpl/embed_test.go
+++ b/pkg/limatmpl/embed_test.go
@@ -11,10 +11,11 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/limayaml"
 	"github.com/sirupsen/logrus"
 	"gotest.tools/v3/assert"
 	"gotest.tools/v3/assert/cmp"
+
+	"github.com/lima-vm/lima/pkg/limayaml"
 )
 
 type embedTestCase struct {
diff --git a/pkg/limatmpl/locator_test.go b/pkg/limatmpl/locator_test.go
index 6c2c03d8..7f6b16dc 100644
--- a/pkg/limatmpl/locator_test.go
+++ b/pkg/limatmpl/locator_test.go
@@ -8,9 +8,10 @@ import (
 	"runtime"
 	"testing"
 
+	"gotest.tools/v3/assert"
+
 	"github.com/lima-vm/lima/pkg/limatmpl"
 	"github.com/lima-vm/lima/pkg/limayaml"
-	"gotest.tools/v3/assert"
 )
 
 func TestInstNameFromImageURL(t *testing.T) {
diff --git a/pkg/limayaml/defaults_test.go b/pkg/limayaml/defaults_test.go
index 63842709..70f6810c 100644
--- a/pkg/limayaml/defaults_test.go
+++ b/pkg/limayaml/defaults_test.go
@@ -16,13 +16,14 @@ import (
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
+	"github.com/sirupsen/logrus"
+	"gotest.tools/v3/assert"
+
 	"github.com/lima-vm/lima/pkg/ioutilx"
 	"github.com/lima-vm/lima/pkg/osutil"
 	"github.com/lima-vm/lima/pkg/ptr"
 	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"github.com/lima-vm/lima/pkg/store/filenames"
-	"github.com/sirupsen/logrus"
-	"gotest.tools/v3/assert"
 )
 
 func TestFillDefault(t *testing.T) {
diff --git a/pkg/limayaml/marshal_test.go b/pkg/limayaml/marshal_test.go
index 0f77b11f..a8682bfa 100644
--- a/pkg/limayaml/marshal_test.go
+++ b/pkg/limayaml/marshal_test.go
@@ -6,8 +6,9 @@ package limayaml
 import (
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/ptr"
 	"gotest.tools/v3/assert"
+
+	"github.com/lima-vm/lima/pkg/ptr"
 )
 
 func TestMarshalEmpty(t *testing.T) {
diff --git a/pkg/networks/commands_test.go b/pkg/networks/commands_test.go
index b3b958b5..7da2bae6 100644
--- a/pkg/networks/commands_test.go
+++ b/pkg/networks/commands_test.go
@@ -8,8 +8,9 @@ import (
 	"runtime"
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/store/dirnames"
 	"gotest.tools/v3/assert"
+
+	"github.com/lima-vm/lima/pkg/store/dirnames"
 )
 
 func TestCheck(t *testing.T) {
diff --git a/pkg/networks/usernet/config_test.go b/pkg/networks/usernet/config_test.go
index 832085a4..dc92d59f 100644
--- a/pkg/networks/usernet/config_test.go
+++ b/pkg/networks/usernet/config_test.go
@@ -7,8 +7,9 @@ import (
 	"net"
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/networks"
 	"gotest.tools/v3/assert"
+
+	"github.com/lima-vm/lima/pkg/networks"
 )
 
 func TestUsernetConfig(t *testing.T) {
diff --git a/pkg/store/fuzz_test.go b/pkg/store/fuzz_test.go
index 511bbdb7..4654a3d3 100644
--- a/pkg/store/fuzz_test.go
+++ b/pkg/store/fuzz_test.go
@@ -8,8 +8,9 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/store/filenames"
 	"gotest.tools/v3/assert"
+
+	"github.com/lima-vm/lima/pkg/store/filenames"
 )
 
 func FuzzLoadYAMLByFilePath(f *testing.F) {
diff --git a/pkg/store/instance_test.go b/pkg/store/instance_test.go
index 52a189e3..5991679c 100644
--- a/pkg/store/instance_test.go
+++ b/pkg/store/instance_test.go
@@ -11,8 +11,9 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/lima-vm/lima/pkg/limayaml"
 	"gotest.tools/v3/assert"
+
+	"github.com/lima-vm/lima/pkg/limayaml"
 )
 
 const separator = string(filepath.Separator)