github.com/MealCraft/glide@v0.13.4/action/cache.go (about) 1 package action 2 3 import ( 4 "os" 5 6 "github.com/Masterminds/glide/cache" 7 "github.com/Masterminds/glide/msg" 8 ) 9 10 // CacheClear clears the Glide cache 11 func CacheClear() { 12 l := cache.Location() 13 14 err := os.RemoveAll(l) 15 if err != nil { 16 msg.Die("Unable to clear the cache: %s", err) 17 } 18 19 cache.SetupReset() 20 cache.Setup() 21 22 msg.Info("Glide cache has been cleared.") 23 }