Ejemplo n.º 1
0
func launchProgram(programName, approved string, args ...string) bool {
	if !utils.DoesFileExist(programName) {
		return false
	}

	utils.EnsureExists(approved)

	cmd := exec.Command(programName, args...)
	cmd.Start()
	return true
}
Ejemplo n.º 2
0
func (s *quiet) Report(approved, received string) bool {
	approvedFull, _ := filepath.Abs(approved)
	receivedFull, _ := filepath.Abs(received)

	if utils.DoesFileExist(approved) {
		fmt.Printf("approval files did not match\napproved: %v\nreceived: %v\n", approvedFull, receivedFull)

	} else {
		fmt.Printf("result never approved\napproved: %v\nreceived: %v\n", approvedFull, receivedFull)
	}

	return true
}