Refactor a bit more for testing, update tests

This commit is contained in:
Ian Fijolek
2019-10-04 14:47:38 -07:00
parent 5c5388d683
commit 6aaeeb32d4
7 changed files with 139 additions and 50 deletions
+13
View File
@@ -21,3 +21,16 @@ func ShellCommand(command string) *exec.Cmd {
//log.Printf("Shell command: %v", shellCommand)
return exec.Command(shellCommand[0], shellCommand[1:]...)
}
// EqualSliceString checks if two string slices are equivalent
func EqualSliceString(a, b []string) bool {
if len(a) != len(b) {
return false
}
for i, val := range a {
if val != b[i] {
return false
}
}
return true
}