| 1 |
package reporters |
| 2 |
|
| 3 |
import ( |
| 4 |
"runtime" |
| 5 |
) |
| 6 |
|
| 7 |
type beyondCompare struct{} |
| 8 |
|
| 9 |
// NewBeyondCompareReporter creates a new reporter for Beyond Compare 4. |
| 10 |
func NewBeyondCompareReporter() Reporter { |
| 11 |
return &beyondCompare{} |
| 12 |
} |
| 13 |
|
| 14 |
func (s *beyondCompare) Report(approved, received string) bool { |
| 15 |
xs := []string{received, approved} |
| 16 |
var programName string |
| 17 |
switch runtime.GOOS { |
| 18 |
case "windows": |
| 19 |
programName = "C:/Program Files/Beyond Compare 4/BComp.exe" |
| 20 |
case "darwin": |
| 21 |
programName = "/Applications/Beyond Compare.app/Contents/MacOS/bcomp" |
| 22 |
} |
| 23 |
|
| 24 |
return launchProgram(programName, approved, xs...) |
| 25 |
} |