diff --git a/slog/attr.go b/slog/attr.go index 5878165d4..9e783d5d4 100644 --- a/slog/attr.go +++ b/slog/attr.go @@ -279,9 +279,9 @@ func (a1 Attr) Equal(a2 Attr) bool { } } -// AppendValue appends a text representation of the Attr's value to dst. +// appendValue appends a text representation of the Attr's value to dst. // The value is formatted as with fmt.Sprint. -func (a Attr) AppendValue(dst []byte) []byte { +func (a Attr) appendValue(dst []byte) []byte { switch a.Kind() { case StringKind: return append(dst, a.str()...) diff --git a/slog/attr_safe.go b/slog/attr_safe.go index 6dc614924..37d997d90 100644 --- a/slog/attr_safe.go +++ b/slog/attr_safe.go @@ -58,5 +58,5 @@ func (a Attr) String() string { return a.str() } var buf []byte - return string(a.AppendValue(buf)) + return string(a.appendValue(buf)) } diff --git a/slog/attr_unsafe.go b/slog/attr_unsafe.go index 9e4d7eabf..1f46d6056 100644 --- a/slog/attr_unsafe.go +++ b/slog/attr_unsafe.go @@ -78,5 +78,5 @@ func (a Attr) String() string { return s } var buf []byte - return string(a.AppendValue(buf)) + return string(a.appendValue(buf)) } diff --git a/slog/text_handler.go b/slog/text_handler.go index 14d7a3e24..b67a65094 100644 --- a/slog/text_handler.go +++ b/slog/text_handler.go @@ -136,7 +136,7 @@ func (ap *textAppender) appendAttrValue(a Attr) error { } ap.appendString(fmt.Sprint(a.Value())) default: - *ap.buf() = a.AppendValue(*ap.buf()) + *ap.buf() = a.appendValue(*ap.buf()) } return nil }