- rename middleware.MayExceedLimit to CanExceedLimit - update the DailyTribeStats/DailyPlayerStats repository and usecase - rename utils.SanitizeSort to utils.SanitizeSortExpression - add two new utils - SanitizeSortExpressions and FindStringWithPrefix
13 lines
188 B
Go
13 lines
188 B
Go
package utils
|
|
|
|
import "strings"
|
|
|
|
func FindStringWithPrefix(sl []string, prefix string) string {
|
|
for _, s := range sl {
|
|
if strings.HasPrefix(s, prefix) {
|
|
return s
|
|
}
|
|
}
|
|
return ""
|
|
}
|