INNER CODE UNIT · Go
cacheClearCommand
kitops-ml/kitops · pkg/cmd/kitcache/cmd.go:78
func cacheClearCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "clear",
Short: `Clear temporary cache storage`,
Long: `Clear temporary files from cache storage.`,
RunE: func(cmd *cobra.Command, args []string) error {
if err := fscache.ClearCache(); err != nil {
return output.Fatalln(err)
}
return nil
},
}
return cmd
}
func printCacheInfo(w io.Writer, totalSize int64, subpaths map[string]int64) {
var subpathNames []string
for s := range subpaths {