mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 03:34:15 -06:00
b7628f2060
See, $ gometalinter --vendor --deadline 10m --disable-all --enable=golint ./... filepath.go:12:5⚠️ error var WalkSkipDir should have name of the form ErrFoo (golint) shortid_generator.go:11:5⚠️ var validUidPattern should be validUIDPattern (golint) shortid_generator.go:19:6⚠️ func IsValidShortUid should be IsValidShortUID (golint) shortid_generator.go:24:6⚠️ func GenerateShortUid should be GenerateShortUID (golint)
12 lines
255 B
Go
12 lines
255 B
Go
package util
|
|
|
|
import "testing"
|
|
|
|
func TestAllowedCharMatchesUidPattern(t *testing.T) {
|
|
for _, c := range allowedChars {
|
|
if !IsValidShortUID(string(c)) {
|
|
t.Fatalf("charset for creating new shortids contains chars not present in uid pattern")
|
|
}
|
|
}
|
|
}
|