github.com/grantbow/fit@v0.7.1-0.20220916164603-1f7c88ac81e6/fitapp/Purge.go (about) 1 package fitapp 2 3 import ( 4 "fmt" 5 bugs "github.com/grantbow/fit/issues" 6 "github.com/grantbow/fit/scm" 7 ) 8 9 // Purge is a subcommand to delete all issues. 10 func Purge(config bugs.Config) { 11 scm, _, err := scm.DetectSCM(make(map[string]bool), config) 12 13 if err != nil { 14 fmt.Printf("Error: %s\n", err.Error()) 15 return 16 } 17 18 err = scm.Purge(bugs.FitDirer(config)) 19 if err != nil { 20 fmt.Printf("Error: %s\n", err.Error()) 21 return 22 } 23 }