Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
feat: 使用できないコマンドの場合エラーを出力する (#84)
Browse files Browse the repository at this point in the history
* feat(app/cmd): 使用できないコマンドならエラーを出力する

* docs(CHANGELOG): 追加内容を追加
  • Loading branch information
arrow2nd authored Oct 12, 2022
1 parent d68a4ea commit 97eb378
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- ツイート削除時に表示上からも削除する
- 複数の GIF・画像の混在ツイートに対応
- 使用できないコマンドの場合エラーを出力する

### Fixed

Expand Down
7 changes: 6 additions & 1 deletion app/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ func newCmd() *cli.Command {
log.Exit(fmt.Sprintf("🐈 nekome for v.%s", version))
}

return nil
arg := f.Arg(0)
if arg != "" {
arg = ": " + arg
}

return fmt.Errorf("unavailable or not found command%s", arg)
},
}
}

0 comments on commit 97eb378

Please sign in to comment.