diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-04-05 23:31:50 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-04-05 23:31:50 +0300 |
commit | 28703e5ece44fc886ec649c48ec1ed321c6a929e (patch) | |
tree | ad9d72cccdc0a601fe4fe500e8962f0aa4c748fb /command.go | |
parent | 51f15a1b8062fc727a0f8d1d8fcfe6ee26d3f00f (diff) |
Initial
Diffstat (limited to 'command.go')
-rw-r--r-- | command.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/command.go b/command.go new file mode 100644 index 0000000..5bf15c8 --- /dev/null +++ b/command.go @@ -0,0 +1,34 @@ +package app + +/* +This file is part of the App project. +Copyright (C) 2021 Alexander Kiryukhin <a.kiryukhin@mail.ru> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <https://www.gnu.org/licenses/>. + +@license GPL-3.0+ <http://spdx.org/licenses/GPL-3.0+> +*/ + +import "flag" + +// Command represents top level command of cli application +type Command interface { + // Name returns name of command + Name() string + // Usage returns short help to command + Usage() string + // Flags returns FlagSet with flags for current command + Flags() *flag.FlagSet + // Run command + Run(args []string) error +} |