pkg/gateway/fetch_secret.go
Function fetchSecret
has 6 return statements (exceeds 4 allowed). Open
Open
func fetchSecret(db *database.SQLStore, namespace string, callExpression string) (string, error) {
callExpression = strings.TrimSpace(callExpression)
if !strings.HasPrefix(callExpression, "fetchSecret") {
return callExpression, nil
}
Function parseFetchSecretExpressionTwoArgs
has 5 return statements (exceeds 4 allowed). Open
Open
func parseFetchSecretExpressionTwoArgs(callExpression string) (*fetchSecretArgs, error) {
// parse fetchSecret( g1 ) pattern
pattern := `^[ ]{0,}fetchSecret[ ]{0,}\((.*)\)[ ]{0,}$`
regex := regexp.MustCompile(pattern)
matches := regex.FindStringSubmatch(callExpression)