Skip to content

Commit

Permalink
Name/Flag fixups for future work
Browse files Browse the repository at this point in the history
  • Loading branch information
codepope committed Jul 7, 2020
1 parent 278b07b commit 3f5d021
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ func newRestartCommand() *Command {
return restartCmd
}

func runRestart(ctx *cmdctx.CmdContext) error {
app, err := ctx.Client.API().RestartApp(ctx.AppName)
func runRestart(cmdctx *cmdctx.CmdContext) error {
app, err := cmdctx.Client.API().RestartApp(cmdctx.AppName)
if err != nil {
return err
}
Expand Down
7 changes: 4 additions & 3 deletions cmd/resume.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@ func newResumeCommand() *Command {
resumeStrings := docstrings.Get("resume")
resumeCmd := BuildCommand(nil, runResume, resumeStrings.Usage, resumeStrings.Short, resumeStrings.Long, os.Stdout, requireSession, requireAppNameAsArg)
resumeCmd.Args = cobra.RangeArgs(0, 1)

return resumeCmd
}

func runResume(ctx *cmdctx.CmdContext) error {
app, err := ctx.Client.API().ResumeApp(ctx.AppName)
func runResume(cmdctx *cmdctx.CmdContext) error {
app, err := cmdctx.Client.API().ResumeApp(cmdctx.AppName)
if err != nil {
return err
}

app, err = ctx.Client.API().GetApp(ctx.AppName)
app, err = cmdctx.Client.API().GetApp(cmdctx.AppName)

fmt.Printf("%s is now %s\n", app.Name, app.Status)

Expand Down

0 comments on commit 3f5d021

Please sign in to comment.