Add automatic settings to ~/.micro/settings.json

This commit is contained in:
Zachary Yedidia
2016-03-28 21:10:10 -04:00
parent 77164fd08c
commit 62967c7935
9 changed files with 128 additions and 56 deletions

View File

@@ -60,3 +60,13 @@ func IsWordChar(str string) bool {
c := str[0]
return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c == '_')
}
// Contains returns whether or not a string array contains a given string
func Contains(list []string, a string) bool {
for _, b := range list {
if b == a {
return true
}
}
return false
}