Files
docker-cli/components/engine/pkg/dockerscript/scanner/extra.go
Solomon Hykes 330c80b96d pkg/dockerscript: <!> is not a special character
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 4481e80636f282b1164b6e4ef0f4cdec246daed5
Component: engine
2014-04-22 15:50:16 -07:00

23 lines
311 B
Go

package scanner
import (
"unicode"
"strings"
)
// 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
}