Skip to content

Commit d96b564

Browse files
committed
fix flags
1 parent 77e63e6 commit d96b564

9 files changed

Lines changed: 40 additions & 40 deletions

File tree

cmd/plural/bundle.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/pluralsh/plural/pkg/bundle"
1010
"github.com/pluralsh/plural/pkg/manifest"
1111
"github.com/pluralsh/plural/pkg/utils"
12-
cli "github.com/urfave/cli/v2"
12+
"github.com/urfave/cli/v2"
1313
)
1414

1515
func (p *Plural) bundleCommands() []*cli.Command {
@@ -25,7 +25,7 @@ func (p *Plural) bundleCommands() []*cli.Command {
2525
Usage: "installs a bundle and writes the configuration to this installation's context",
2626
ArgsUsage: "REPO NAME",
2727
Flags: []cli.Flag{
28-
cli.BoolFlag{
28+
&cli.BoolFlag{
2929
Name: "refresh",
3030
Usage: "re-enter the configuration for this bundle",
3131
},

cmd/plural/crypto.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func cryptoCommands() []*cli.Command {
8484
Usage: "generates a random string",
8585
Action: randString,
8686
Flags: []cli.Flag{
87-
cli.IntFlag{
87+
&cli.IntFlag{
8888
Name: "len",
8989
Usage: "the length of the string to generate",
9090
Value: 32,
@@ -106,7 +106,7 @@ func cryptoCommands() []*cli.Command {
106106
Usage: "allows a list of plural users to decrypt this repository",
107107
ArgsUsage: "",
108108
Flags: []cli.Flag{
109-
cli.StringSliceFlag{
109+
&cli.StringSliceFlag{
110110
Name: "email",
111111
Usage: "a email to share with (multiple allowed)",
112112
},
@@ -117,7 +117,7 @@ func cryptoCommands() []*cli.Command {
117117
Name: "setup-keys",
118118
Usage: "creates an age keypair, and uploads the public key to plural for use in plural crypto share",
119119
Flags: []cli.Flag{
120-
cli.StringFlag{
120+
&cli.StringFlag{
121121
Name: "name",
122122
Usage: "a name for the key",
123123
},

cmd/plural/link.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import (
55
cli "github.com/urfave/cli/v2"
66
)
77

8-
func linkCommands() []cli.Command {
9-
return []cli.Command{
8+
func linkCommands() []*cli.Command {
9+
return []*cli.Command{
1010
{
1111
Name: "link",
1212
Usage: "links a local package into an installation repo",
1313
ArgsUsage: "TOOL REPO",
1414
Action: handleLink,
1515
Flags: []cli.Flag{
16-
cli.StringFlag{
16+
&cli.StringFlag{
1717
Name: "name, n",
1818
Usage: "the name of the artifact to link",
1919
},
20-
cli.StringFlag{
20+
&cli.StringFlag{
2121
Name: "path, f",
2222
Usage: "local path to that artifact (can be relative)",
2323
},

cmd/plural/plural.go

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
)
1616

1717
func init() {
18-
cli.BashCompletionFlag = cli.BoolFlag{Name: "compgen", Hidden: true}
18+
cli.BashCompletionFlag = &cli.BoolFlag{Name: "compgen", Hidden: true}
1919
}
2020

2121
const ApplicationName = "plural"
@@ -36,8 +36,8 @@ func (p *Plural) InitKube() error {
3636
return nil
3737
}
3838

39-
func (p *Plural) getCommands() []cli.Command {
40-
return []cli.Command{
39+
func (p *Plural) getCommands() []*cli.Command {
40+
return []*cli.Command{
4141
{
4242
Name: "version",
4343
Aliases: []string{"v", "vsn"},
@@ -49,11 +49,11 @@ func (p *Plural) getCommands() []cli.Command {
4949
Aliases: []string{"b"},
5050
Usage: "builds your workspace",
5151
Flags: []cli.Flag{
52-
cli.StringFlag{
52+
&cli.StringFlag{
5353
Name: "only",
5454
Usage: "repository to (re)build",
5555
},
56-
cli.BoolFlag{
56+
&cli.BoolFlag{
5757
Name: "force",
5858
Usage: "force workspace to build even if remote is out of sync",
5959
},
@@ -66,27 +66,27 @@ func (p *Plural) getCommands() []cli.Command {
6666
Usage: "Deploys the current workspace. This command will first sniff out git diffs in workspaces, topsort them, then apply all changes.",
6767
ArgsUsage: "WKSPACE",
6868
Flags: []cli.Flag{
69-
cli.BoolFlag{
69+
&cli.BoolFlag{
7070
Name: "silence",
7171
Usage: "don't display notes for deployed apps",
7272
},
73-
cli.BoolFlag{
73+
&cli.BoolFlag{
7474
Name: "verbose",
7575
Usage: "show all command output during execution",
7676
},
77-
cli.BoolFlag{
77+
&cli.BoolFlag{
7878
Name: "ignore-console",
7979
Usage: "don't deploy the plural console",
8080
},
81-
cli.BoolFlag{
81+
&cli.BoolFlag{
8282
Name: "all",
8383
Usage: "deploy all repos irregardless of changes",
8484
},
85-
cli.StringFlag{
85+
&cli.StringFlag{
8686
Name: "commit",
8787
Usage: "commits your changes with this message",
8888
},
89-
cli.BoolFlag{
89+
&cli.BoolFlag{
9090
Name: "force",
9191
Usage: "use force push when pushing to git",
9292
},
@@ -131,7 +131,7 @@ func (p *Plural) getCommands() []cli.Command {
131131
Name: "apply",
132132
Usage: "applys the current pluralfile",
133133
Flags: []cli.Flag{
134-
cli.StringFlag{
134+
&cli.StringFlag{
135135
Name: "file, f",
136136
Usage: "pluralfile to use",
137137
},
@@ -144,7 +144,7 @@ func (p *Plural) getCommands() []cli.Command {
144144
Aliases: []string{"v"},
145145
Usage: "validates your workspace",
146146
Flags: []cli.Flag{
147-
cli.StringFlag{
147+
&cli.StringFlag{
148148
Name: "only",
149149
Usage: "repository to (re)build",
150150
},
@@ -172,15 +172,15 @@ func (p *Plural) getCommands() []cli.Command {
172172
Usage: "iterates through all installations in reverse topological order, deleting helm installations and terraform",
173173
ArgsUsage: "WKSPACE",
174174
Flags: []cli.Flag{
175-
cli.StringFlag{
175+
&cli.StringFlag{
176176
Name: "from",
177177
Usage: "where to start your deploy command (useful when restarting interrupted destroys)",
178178
},
179-
cli.StringFlag{
179+
&cli.StringFlag{
180180
Name: "commit",
181181
Usage: "commits your changes with this message",
182182
},
183-
cli.BoolFlag{
183+
&cli.BoolFlag{
184184
Name: "force",
185185
Usage: "use force push when pushing to git",
186186
},
@@ -191,11 +191,11 @@ func (p *Plural) getCommands() []cli.Command {
191191
Name: "init",
192192
Usage: "initializes plural within a git repo",
193193
Flags: []cli.Flag{
194-
cli.StringFlag{
194+
&cli.StringFlag{
195195
Name: "endpoint",
196196
Usage: "the endpoint for the plural installation you're working with",
197197
},
198-
cli.StringFlag{
198+
&cli.StringFlag{
199199
Name: "service-account",
200200
Usage: "email for the service account you'd like to use for this workspace",
201201
},
@@ -212,11 +212,11 @@ func (p *Plural) getCommands() []cli.Command {
212212
Usage: "logs into plural and saves credentials to the current config profile",
213213
Action: handleLogin,
214214
Flags: []cli.Flag{
215-
cli.StringFlag{
215+
&cli.StringFlag{
216216
Name: "endpoint",
217217
Usage: "the endpoint for the plural installation you're working with",
218218
},
219-
cli.StringFlag{
219+
&cli.StringFlag{
220220
Name: "service-account",
221221
Usage: "email for the service account you'd like to use for this workspace",
222222
},
@@ -337,7 +337,7 @@ func (p *Plural) getCommands() []cli.Command {
337337
Aliases: []string{"tpl"},
338338
Usage: "templates a helm chart to be uploaded to plural",
339339
Flags: []cli.Flag{
340-
cli.StringFlag{
340+
&cli.StringFlag{
341341
Name: "values",
342342
Usage: "the values file",
343343
},

cmd/plural/push.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ func (p *Plural) pushCommands() []*cli.Command {
4747
ArgsUsage: "path/to/def.yaml REPO",
4848
Action: p.handleArtifact,
4949
Flags: []cli.Flag{
50-
cli.StringFlag{
50+
&cli.StringFlag{
5151
Name: "platform",
5252
Value: "mac",
5353
Usage: "name of the OS this binary is built for",
5454
},
55-
cli.StringFlag{
55+
&cli.StringFlag{
5656
Name: "arch",
5757
Value: "amd64",
5858
Usage: "machine architecture the binary is compatible with",

cmd/plural/repos.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ func (p *Plural) reposCommands() []*cli.Command {
2929
Usage: "list available repositories to install",
3030
ArgsUsage: "",
3131
Flags: []cli.Flag{
32-
cli.StringFlag{
32+
&cli.StringFlag{
3333
Name: "query",
3434
Usage: "string to search by",
3535
},
36-
cli.StringFlag{
36+
&cli.StringFlag{
3737
Name: "format",
3838
Usage: "format to print the repositories out, eg csv or default is table",
3939
},

cmd/plural/shell.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ func shellCommands() []*cli.Command {
1818
Usage: "syncs the setup in your cloud shell locally",
1919
Action: handleShellSync,
2020
Flags: []cli.Flag{
21-
cli.StringFlag{
21+
&cli.StringFlag{
2222
Name: "endpoint",
2323
Usage: "the endpoint for the plural installation you're working with",
2424
},
25-
cli.StringFlag{
25+
&cli.StringFlag{
2626
Name: "service-account",
2727
Usage: "email for the service account you'd like to use for this workspace",
2828
},

cmd/plural/utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ func utilsCommands() []*cli.Command {
2424
ArgsUsage: "CHART",
2525
Usage: "Bumps a chart's image tag",
2626
Flags: []cli.Flag{
27-
cli.StringFlag{
27+
&cli.StringFlag{
2828
Name: "path",
2929
Usage: "path to tag in helm values file",
3030
},
31-
cli.StringFlag{
31+
&cli.StringFlag{
3232
Name: "tag",
3333
Usage: "the image tag to set to",
3434
},

cmd/plural/workspace.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ func workspaceCommands() []*cli.Command {
2525
Usage: "upgrade/installs the helm chart for this subworkspace",
2626
ArgsUsage: "NAME",
2727
Flags: []cli.Flag{
28-
cli.StringSliceFlag{
28+
&cli.StringSliceFlag{
2929
Name: "skip",
3030
Usage: "helm sub-chart to skip. can be passed multiple times",
3131
},
32-
cli.BoolFlag{
32+
&cli.BoolFlag{
3333
Name: "wait",
3434
Usage: "have helm wait until all pods are in ready state",
3535
},

0 commit comments

Comments
 (0)