MCPcopy Index your code
hub / github.com/cli/cli / clearCacheRun

Function clearCacheRun

pkg/cmd/config/clear-cache/clear_cache.go:44–51  ·  view source on GitHub ↗
(opts *ClearCacheOptions)

Source from the content-addressed store, hash-verified

42}
43
44func clearCacheRun(opts *ClearCacheOptions) error {
45 if err := os.RemoveAll(opts.CacheDir); err != nil {
46 return err
47 }
48 cs := opts.IO.ColorScheme()
49 fmt.Fprintf(opts.IO.Out, "%s Cleared the cache\n", cs.SuccessIcon())
50 return nil
51}

Callers 2

TestClearCacheRunFunction · 0.85
NewCmdConfigClearCacheFunction · 0.85

Calls 2

ColorSchemeMethod · 0.80
SuccessIconMethod · 0.80

Tested by 1

TestClearCacheRunFunction · 0.68