pkg/dockerscript/scanner/extra.go
Solomon Hykes c5b6f20d56 Fix Go formatting in beam and dockerscript
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
2014-04-22 16:16:29 -07:00

21 lines
311 B
Go

package scanner
import (
"strings"
"unicode"
)
// extra functions used to hijack the upstream text/scanner
func detectIdent(ch rune) bool {
if unicode.IsLetter(ch) {
return true
}
if unicode.IsDigit(ch) {
return true
}
if strings.ContainsRune("_:/+-@%^.!=", ch) {
return true
}
return false
}