Skip to content

Commit

Permalink
Collapse out single-use constant.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Promislow <[email protected]>
  • Loading branch information
ericpromislow committed Jan 28, 2022
1 parent 7b868b4 commit ef88a07
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/go/nerdctl-stub/parse_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,8 @@ func init() {
registerArgHandler("compose", "-f", filePathArgHandler)
registerArgHandler("compose", "--project-directory", filePathArgHandler)
registerArgHandler("compose", "--env-file", filePathArgHandler)
subcommands := []string{"build", "config", "down", "kill", "logs", "ps", "pull", "push", "up"}
for _, sc := range subcommands {
// No `-f` option because they aren't in the help for any of the `docker compose X` subcommands.:w
for _, sc := range []string{"build", "config", "down", "kill", "logs", "ps", "pull", "push", "up"} {
// No `-f` option because they aren't in the help for any of the `docker compose X` subcommands.
registerArgHandler("compose " + sc, "--file", filePathArgHandler)
registerArgHandler("compose " + sc, "--project-directory", filePathArgHandler)
registerArgHandler("compose " + sc, "--env-file", filePathArgHandler)
Expand Down

0 comments on commit ef88a07

Please sign in to comment.