Skip to content

Commit

Permalink
Merge pull request sequelize#244 from exercism/cmd-params
Browse files Browse the repository at this point in the history
Normalize variable names in cmd package
  • Loading branch information
Tonkpils committed Nov 4, 2015
2 parents 39dd765 + 16e4ae5 commit 91c8e86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ func List(ctx *cli.Context) {
log.Fatal(msg)
}

language := args[0]
trackID := args[0]
client := api.NewClient(c)
problems, err := client.List(language)
problems, err := client.List(trackID)
if err != nil {
if err == api.ErrUnknownTrack {
log.Fatalf("There is no track with ID '%s'.", language)
log.Fatalf("There is no track with ID '%s'.", trackID)
}
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ func Open(ctx *cli.Context) {
log.Fatal(msg)
}

language := args[0]
trackID := args[0]
slug := args[1]
submission, err := client.Submission(language, slug)
submission, err := client.Submission(trackID, slug)
if err != nil {
log.Fatal(err)
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ func Skip(ctx *cli.Context) {
}

var (
language = args[0]
slug = args[1]
trackID = args[0]
slug = args[1]
)

client := api.NewClient(c)
if err := client.Skip(language, slug); err != nil {
if err := client.Skip(trackID, slug); err != nil {
log.Fatal(err)
}

fmt.Printf("Exercise %q in %q has been skipped.\n", slug, language)
fmt.Printf("Exercise %q in %q has been skipped.\n", slug, trackID)
}

0 comments on commit 91c8e86

Please sign in to comment.