예제 #1
0
func coverToolInstalled() bool {
	working := getWorkDir()
	command := system.NewCommand(working, "go", "tool", "cover").Execute()
	installed := strings.Contains(command.Output, "Usage of 'go tool cover':")
	if !installed {
		log.Print(coverToolMissing)
		return false
	}
	return true
}
예제 #2
0
func coverToolInstalled() bool {
	working, err := os.Getwd()
	if err != nil {
		working = "."
	}
	command := system.NewCommand(working, "go", "tool", "cover").Execute()
	installed := strings.Contains(command.Output, "Usage of 'go tool cover':")
	if !installed {
		log.Print(coverToolMissing)
		return false
	}
	return true
}