MCPcopy
hub / github.com/helmfile/helmfile / NewCacheInfoSubcommand

Function NewCacheInfoSubcommand

cmd/cache.go:10–30  ·  view source on GitHub ↗
(cacheImpl *config.CacheImpl)

Source from the content-addressed store, hash-verified

8)
9
10func 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
32func NewCacheCleanupSubcommand(cacheImpl *config.CacheImpl) *cobra.Command {
33 cmd := &cobra.Command{

Callers 1

NewCacheCmdFunction · 0.85

Calls 5

NewCLIConfigImplFunction · 0.92
NewFunction · 0.92
toCLIErrorFunction · 0.85
ShowCacheDirMethod · 0.80
ValidateConfigMethod · 0.45

Tested by

no test coverage detected