Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions array.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,22 @@
}
return nil
}

// runes is an array helper for slices of rune, mirroring the existing
// typed array helpers in this file.
type runes []rune

func (rs runes) MarshalLogArray(arr zapcore.ArrayEncoder) error {
for i := range rs {
arr.AppendInt32(int32(rs[i]))
}
return nil
}

// Runes constructs a field that carries a slice of runes.
func Runes(key string, rs []rune) Field {
return Array(key, runes(rs))
}

// BUILD_BREAK references an undefined identifier and fails `go build`.
var _ = undefinedBuildBreakSymbol

Check failure on line 339 in array.go

View workflow job for this annotation

GitHub Actions / build

undefined: undefinedBuildBreakSymbol
Loading