mirror of
https://github.com/grafana/grafana.git
synced 2025-02-09 23:16:16 -06:00
Simplify if expression (gosimple)
pkg/util/shortid_generator.go:20:2: should use 'return <expr>' instead of 'if <expr> { return <bool> }; return <bool>' (S1008)
This commit is contained in:
parent
f61e69ce75
commit
da5654ad04
@ -17,11 +17,7 @@ func init() {
|
||||
|
||||
// IsValidShortUid checks if short unique identifier contains valid characters
|
||||
func IsValidShortUid(uid string) bool {
|
||||
if !validUidPattern(uid) {
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
return validUidPattern(uid)
|
||||
}
|
||||
|
||||
// GenerateShortUid generates a short unique identifier.
|
||||
|
Loading…
Reference in New Issue
Block a user