Skip to content

Commit

Permalink
fix: document ValidateFields
Browse files Browse the repository at this point in the history
  • Loading branch information
rosstimothy committed Jan 8, 2025
1 parent 95ca8b2 commit 839b31b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils/log/slog.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ var knownFormatFields = map[string]struct{}{
TimestampField: {},
}

// ValidateFields ensures the provided fields map to the allowed fields. An error
// is returned if any of the fields are invalid.
func ValidateFields(formatInput []string) (result []string, err error) {
for _, component := range formatInput {
component = strings.TrimSpace(component)
Expand Down

0 comments on commit 839b31b

Please sign in to comment.