Skip to content

Commit 50c9b8a

Browse files
authored
Merge pull request #529 from doringeman/lint-gci
chore(lint): enable gci formatter for import grouping
2 parents ca12aae + d5cc97b commit 50c9b8a

File tree

32 files changed

+39
-66
lines changed

32 files changed

+39
-66
lines changed

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ formatters:
77
enable:
88
- gofmt
99
- goimports
10+
- gci
11+
settings:
12+
gci:
13+
sections:
14+
- standard # stdlib
15+
- default # everything else
1016

1117
linters:
1218
enable:

cmd/cli/commands/compose.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import (
99
"strconv"
1010
"strings"
1111

12-
"github.com/docker/model-runner/cmd/cli/pkg/types"
13-
"github.com/spf13/pflag"
14-
1512
"github.com/docker/model-runner/cmd/cli/desktop"
13+
"github.com/docker/model-runner/cmd/cli/pkg/types"
1614
"github.com/docker/model-runner/pkg/inference"
1715
"github.com/docker/model-runner/pkg/inference/backends/llamacpp"
1816
dmrm "github.com/docker/model-runner/pkg/inference/models"
1917
"github.com/docker/model-runner/pkg/inference/scheduling"
2018
"github.com/spf13/cobra"
19+
"github.com/spf13/pflag"
2120
)
2221

2322
func newComposeCmd() *cobra.Command {

cmd/cli/commands/inspect.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"github.com/docker/model-runner/cmd/cli/commands/completion"
77
"github.com/docker/model-runner/cmd/cli/commands/formatter"
88
"github.com/docker/model-runner/cmd/cli/desktop"
9-
109
"github.com/spf13/cobra"
1110
)
1211

cmd/cli/commands/package.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,16 @@ import (
1010
"os"
1111
"path/filepath"
1212

13+
"github.com/docker/model-runner/cmd/cli/commands/completion"
14+
"github.com/docker/model-runner/cmd/cli/desktop"
1315
"github.com/docker/model-runner/pkg/distribution/builder"
1416
"github.com/docker/model-runner/pkg/distribution/distribution"
1517
"github.com/docker/model-runner/pkg/distribution/packaging"
1618
"github.com/docker/model-runner/pkg/distribution/registry"
1719
"github.com/docker/model-runner/pkg/distribution/tarball"
1820
"github.com/docker/model-runner/pkg/distribution/types"
19-
2021
"github.com/docker/model-runner/pkg/go-containerregistry/pkg/name"
2122
"github.com/spf13/cobra"
22-
23-
"github.com/docker/model-runner/cmd/cli/commands/completion"
24-
"github.com/docker/model-runner/cmd/cli/desktop"
2523
)
2624

2725
// validateAbsolutePath validates that a path is absolute and returns the cleaned path

cmd/cli/commands/pull.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/docker/model-runner/cmd/cli/commands/completion"
77
"github.com/docker/model-runner/cmd/cli/desktop"
8-
98
"github.com/spf13/cobra"
109
)
1110

cmd/cli/commands/push.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/docker/model-runner/cmd/cli/commands/completion"
77
"github.com/docker/model-runner/cmd/cli/desktop"
8-
98
"github.com/spf13/cobra"
109
)
1110

cmd/cli/commands/rm.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"fmt"
55

66
"github.com/docker/model-runner/cmd/cli/commands/completion"
7-
87
"github.com/spf13/cobra"
98
)
109

cmd/cli/commands/run.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ import (
1515
"github.com/docker/model-runner/cmd/cli/commands/completion"
1616
"github.com/docker/model-runner/cmd/cli/desktop"
1717
"github.com/docker/model-runner/cmd/cli/readline"
18-
"github.com/muesli/termenv"
19-
2018
"github.com/fatih/color"
19+
"github.com/muesli/termenv"
2120
"github.com/spf13/cobra"
2221
"golang.org/x/term"
2322
)

cmd/cli/commands/unload.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/docker/model-runner/cmd/cli/commands/completion"
77
"github.com/docker/model-runner/cmd/cli/desktop"
8-
98
"github.com/spf13/cobra"
109
)
1110

cmd/cli/desktop/progress.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111

1212
"github.com/docker/docker/pkg/jsonmessage"
1313
"github.com/docker/go-units"
14-
1514
"github.com/docker/model-runner/cmd/cli/pkg/standalone"
1615
)
1716

0 commit comments

Comments
 (0)