(cacheImpl *config.CacheImpl)
| 8 | ) |
| 9 | |
| 10 | func NewCacheInfoSubcommand(cacheImpl *config.CacheImpl) *cobra.Command { |
| 11 | cmd := &cobra.Command{ |
| 12 | Use: "info", |
| 13 | Short: "cache info", |
| 14 | RunE: func(cmd *cobra.Command, args []string) error { |
| 15 | err := config.NewCLIConfigImpl(cacheImpl.GlobalImpl) |
| 16 | if err != nil { |
| 17 | return err |
| 18 | } |
| 19 | |
| 20 | if err := cacheImpl.ValidateConfig(); err != nil { |
| 21 | return err |
| 22 | } |
| 23 | |
| 24 | a := app.New(cacheImpl) |
| 25 | return toCLIError(cacheImpl.GlobalImpl, a.ShowCacheDir(cacheImpl)) |
| 26 | }, |
| 27 | } |
| 28 | |
| 29 | return cmd |
| 30 | } |
| 31 | |
| 32 | func NewCacheCleanupSubcommand(cacheImpl *config.CacheImpl) *cobra.Command { |
| 33 | cmd := &cobra.Command{ |
no test coverage detected