aboutsummaryrefslogtreecommitdiffstats
path: root/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'util.go')
-rw-r--r--util.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/util.go b/util.go
index 4416696..d40d33e 100644
--- a/util.go
+++ b/util.go
@@ -22,6 +22,28 @@ func Homedir() string {
return os.Getenv("HOME")
}
+func equal(a, b []string) bool {
+ if a == nil && b == nil {
+ return true;
+ }
+
+ if a == nil || b == nil {
+ return false;
+ }
+
+ if len(a) != len(b) {
+ return false
+ }
+
+ for i := range a {
+ if a[i] != b[i] {
+ return false
+ }
+ }
+
+ return true
+}
+
func ExitF(format string, a ...interface{}) {
fmt.Fprintf(os.Stderr, format, a...)
fmt.Println("")