diff --git a/.travis.yml b/.travis.yml index 78086b9..16c5cec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ install: - go get github.com/gordonklaus/ineffassign script: + - diff -u <(echo -n) <(gofmt -d .) - ineffassign . - go vet $(go list ./... | grep -v /vendor/) - go test -v $(go list ./... | grep -v /vendor/) diff --git a/chat/sanitize.go b/chat/sanitize.go index b567825..cb19bb0 100644 --- a/chat/sanitize.go +++ b/chat/sanitize.go @@ -3,6 +3,7 @@ package chat import "regexp" var reStripName = regexp.MustCompile("[^\\w.-]") + const maxLength = 16 // SanitizeName returns a name with only allowed characters and a reasonable length