Skip to content

Commit 982ef56

Browse files
authored
Merge pull request #2245 from alexandear/remove-dependency-dedent
Remove dependency on github.com/lithammer/dedent
2 parents 0d23d09 + 1cc5b68 commit 982ef56

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

cmd/limactl/list.go

+11-12
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010

1111
"github.com/cheggaaa/pb/v3/termutil"
1212
"github.com/lima-vm/lima/pkg/store"
13-
"github.com/lithammer/dedent"
1413
"github.com/mattn/go-isatty"
1514
"github.com/sirupsen/logrus"
1615
"github.com/spf13/cobra"
@@ -38,17 +37,17 @@ func newListCommand() *cobra.Command {
3837
Use: "list [flags] [INSTANCE]...",
3938
Aliases: []string{"ls"},
4039
Short: "List instances of Lima.",
41-
Long: "List instances of Lima.\n" + dedent.Dedent(`
42-
The output can be presented in one of several formats, using the --format <format> flag.
43-
44-
--format json - output in json format
45-
--format yaml - output in yaml format
46-
--format table - output in table format
47-
--format '{{ <go template> }}' - if the format begins and ends with '{{ }}', then it is used as a go template.
48-
`) + store.FormatHelp + dedent.Dedent(`
49-
The following legacy flags continue to function:
50-
--json - equal to '--format json'
51-
`),
40+
Long: `List instances of Lima.
41+
42+
The output can be presented in one of several formats, using the --format <format> flag.
43+
44+
--format json - output in json format
45+
--format yaml - output in yaml format
46+
--format table - output in table format
47+
--format '{{ <go template> }}' - if the format begins and ends with '{{ }}', then it is used as a go template.
48+
` + store.FormatHelp + `
49+
The following legacy flags continue to function:
50+
--json - equal to '--format json'`,
5251
Args: WrapArgsError(cobra.ArbitraryArgs),
5352
RunE: listAction,
5453
ValidArgsFunction: listBashComplete,

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ require (
2626
github.com/gorilla/mux v1.8.1
2727
github.com/lima-vm/go-qcow2reader v0.1.1
2828
github.com/lima-vm/sshocker v0.3.4
29-
github.com/lithammer/dedent v1.1.0
3029
github.com/mattn/go-isatty v0.0.20
3130
github.com/mattn/go-shellwords v1.0.12
3231
github.com/mdlayher/vsock v1.2.1

go.sum

-2
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ github.com/lima-vm/sshocker v0.3.4 h1:5rn6vMkfqwZSZiBW+Udo505OIRhPB4xbLUDdEnFgWw
169169
github.com/lima-vm/sshocker v0.3.4/go.mod h1:QT4c7XNmeQTv79h5/8EgiS7U51B9BLenlXV7idCY0tE=
170170
github.com/linuxkit/virtsock v0.0.0-20220523201153-1a23e78aa7a2 h1:DZMFueDbfz6PNc1GwDRA8+6lBx1TB9UnxDQliCqR73Y=
171171
github.com/linuxkit/virtsock v0.0.0-20220523201153-1a23e78aa7a2/go.mod h1:SWzULI85WerrFt3u+nIm5F9l7EvxZTKQvd0InF3nmgM=
172-
github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY=
173-
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
174172
github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
175173
github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
176174
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=

0 commit comments

Comments
 (0)