Mercurial > hg > Members > anatofuz > growsync
view cmd_version.go @ 10:90376341ed28
...
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 08 Dec 2020 16:14:55 +0900 |
parents | 359eff175bf1 |
children |
line wrap: on
line source
package growsync import ( "context" "fmt" "io" ) type versionCmd struct{} func (pc *versionCmd) name() string { return "version" } func (pc *versionCmd) description() string { return "display version" } func (pc *versionCmd) run(ctx context.Context, argv []string, config *growiConfig, stdWriter io.Writer, errorWriter io.Writer) error { _, err := fmt.Fprintf(stdWriter, "%s v%s\n", cmdName, version) return err }