blankFields returns the list of fields in the claims map that are an empty string.
(claims map[string]interface{})
| 1640 | // blankFields returns the list of fields in the claims map that are |
| 1641 | // an empty string. |
| 1642 | func blankFields(claims map[string]interface{}) []string { |
| 1643 | fields := make([]string, 0) |
| 1644 | for field, value := range claims { |
| 1645 | if valueStr, ok := value.(string); ok && valueStr == "" { |
| 1646 | fields = append(fields, field) |
| 1647 | } |
| 1648 | } |
| 1649 | slices.Sort(fields) |
| 1650 | return fields |
| 1651 | } |
| 1652 | |
| 1653 | // mergeClaims merges the claims from a and b and returns the merged set. |
| 1654 | // claims from b take precedence over claims from a. |
no outgoing calls
no test coverage detected