update dependencies

also make sure the module that enables /dev/null path of the sh
interpreter is enabled
This commit is contained in:
Andrey Nering
2017-10-15 17:41:15 -02:00
parent 2fc32414f5
commit 0513a21e25
36 changed files with 894 additions and 245 deletions

View File

@@ -43,19 +43,26 @@ func ToCamelCase(str string) string {
if len(str) == 0 {
return buf.String()
}
buf.WriteRune(unicode.ToUpper(r0))
r0, size = utf8.DecodeRuneInString(str)
str = str[size:]
r0 = unicode.ToUpper(r0)
for len(str) > 0 {
r1 = r0
r0, size = utf8.DecodeRuneInString(str)
str = str[size:]
if r1 == '_' && r0 != '_' {
if r1 == '_' && r0 == '_' {
buf.WriteRune(r1)
continue
}
if r1 == '_' {
r0 = unicode.ToUpper(r0)
} else {
r0 = unicode.ToLower(r0)
}
if r1 != '_' {
buf.WriteRune(r1)
}
}