Skip to content

Commit 18de984

Browse files
committed
rename wsrt to writeString
1 parent 72c2634 commit 18de984

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (c command) WriteTo(w io.Writer) (int64, error) {
9191

9292
// String returns the string representation of the command.
9393
func (c command) String() string {
94-
return wstr(c)
94+
return writeStr(c)
9595
}
9696

9797
// LogValue returns a slog.Value object representing the command.

event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (e Event) WriteTo(w io.Writer) (int64, error) {
118118

119119
// String returns a string representation of the Event.
120120
func (e Event) String() string {
121-
return wstr(e)
121+
return writeStr(e)
122122
}
123123

124124
// MarshalJSON is a Go function that marshals the Event to JSON.

response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (r response) WriteTo(w io.Writer) (int64, error) {
9494

9595
// String returns the string representation of the response.
9696
func (r response) String() string {
97-
return wstr(r)
97+
return writeStr(r)
9898
}
9999

100100
// LogValue returns a slog.Value object that represents the log attributes for the response.

tools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func writeTo(w io.Writer, f func(w *bufio.Writer)) (int64, error) {
2020
return int64(buf.Buffered() - nn), buf.Flush() // write buffered content
2121
}
2222

23-
// wstr concatenates the string representation of the io.WriterTo interface
23+
// writeStr concatenates the string representation of the io.WriterTo interface
2424
// parameter into a single string.
2525
//
2626
// It takes an io.WriterTo parameter, which is an interface type that can be
@@ -32,7 +32,7 @@ func writeTo(w io.Writer, f func(w *bufio.Writer)) (int64, error) {
3232
//
3333
// It returns a string that contains the concatenated string representation of
3434
// the io.WriterTo parameter.
35-
func wstr(w io.WriterTo) string {
35+
func writeStr(w io.WriterTo) string {
3636
var b strings.Builder
3737

3838
w.WriteTo(&b) //nolint:errcheck // write to buffer

0 commit comments

Comments
 (0)