INNER CODE UNIT · Go
NewCacheCleanupSubcommand
helmfile/helmfile · cmd/cache.go:32
func NewCacheCleanupSubcommand(cacheImpl *config.CacheImpl) *cobra.Command {
cmd := &cobra.Command{
Use: "cleanup",
Short: "clean up cache directory",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewCLIConfigImpl(cacheImpl.GlobalImpl)
if err != nil {
return err
}
if err := cacheImpl.ValidateConfig(); err != nil {
return err
}
a := app.New(cacheImpl)
return toCLIError(cacheImpl.GlobalImpl, a.CleanCacheDir(cacheImpl))
},
}