cli.go 405 B

12345678910111213141516171819
  1. package cli
  2. import (
  3. "github.com/rs/zerolog"
  4. "github.com/spf13/viper"
  5. )
  6. type Context struct {
  7. Config *viper.Viper
  8. Log zerolog.Logger
  9. }
  10. type CLI struct {
  11. Add AddCmd `cmd:"" help:"Add a redirect"`
  12. Get GetCmd `cmd:"" help:"Get a redirect"`
  13. List ListCmd `cmd:"" help:"List all redirects"`
  14. Rm RmCmd `cmd:"" help:"Delete a redirect"`
  15. Start StartCmd `cmd:"" help:"Start Shorty"`
  16. }