package permissions import "strings" func MatchScope(pattern, scope string) bool { if strings.HasSuffix(pattern, "/*") { prefix := strings.TrimSuffix(pattern, "/*") return strings.HasPrefix(scope, prefix) } return pattern == scope }