mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -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:
@@ -17,11 +17,7 @@ func init() {
|
|||||||
|
|
||||||
// IsValidShortUid checks if short unique identifier contains valid characters
|
// IsValidShortUid checks if short unique identifier contains valid characters
|
||||||
func IsValidShortUid(uid string) bool {
|
func IsValidShortUid(uid string) bool {
|
||||||
if !validUidPattern(uid) {
|
return validUidPattern(uid)
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateShortUid generates a short unique identifier.
|
// GenerateShortUid generates a short unique identifier.
|
||||||
|
|||||||
Reference in New Issue
Block a user