command.go 270 B

1234567891011121314151617181920
  1. package shell
  2. import "io"
  3. type command interface {
  4. Name() string
  5. Help() string
  6. Do([]string, *CommandEnv, io.Writer) error
  7. HasTag(tag CommandTag) bool
  8. }
  9. var (
  10. Commands = []command{}
  11. )
  12. type CommandTag string
  13. const (
  14. ResourceHeavy CommandTag = "resourceHeavy"
  15. )