mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-12 23:27:17 +03:00
Travis: Check for gofmt issues. (#241)
* Travis: Check for gofmt issues. This will help catch issues like https://github.com/shazow/ssh-chat/pull/240#discussion_r127626103 in CI. * chat: Fix gofmt issue.
This commit is contained in:
parent
e3b5c3712c
commit
50001bf172
@ -15,6 +15,7 @@ install:
|
|||||||
- go get github.com/gordonklaus/ineffassign
|
- go get github.com/gordonklaus/ineffassign
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- diff -u <(echo -n) <(gofmt -d .)
|
||||||
- ineffassign .
|
- ineffassign .
|
||||||
- go vet $(go list ./... | grep -v /vendor/)
|
- go vet $(go list ./... | grep -v /vendor/)
|
||||||
- go test -v $(go list ./... | grep -v /vendor/)
|
- go test -v $(go list ./... | grep -v /vendor/)
|
||||||
|
@ -3,6 +3,7 @@ package chat
|
|||||||
import "regexp"
|
import "regexp"
|
||||||
|
|
||||||
var reStripName = regexp.MustCompile("[^\\w.-]")
|
var reStripName = regexp.MustCompile("[^\\w.-]")
|
||||||
|
|
||||||
const maxLength = 16
|
const maxLength = 16
|
||||||
|
|
||||||
// SanitizeName returns a name with only allowed characters and a reasonable length
|
// SanitizeName returns a name with only allowed characters and a reasonable length
|
||||||
|
Loading…
x
Reference in New Issue
Block a user