MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / removeNewline

Method removeNewline

logger/buffer.go:107–111  ·  view source on GitHub ↗

removeNewline removes the trailing newline character from the buffer, if present.

()

Source from the content-addressed store, hash-verified

105
106// removeNewline removes the trailing newline character from the buffer, if present.
107func (b *buffer) removeNewline() {
108 if len(*b) > 0 && (*b)[len(*b)-1] == '\n' {
109 *b = (*b)[:len(*b)-1]
110 }
111}
112
113// isStringQuoteSafe checks if a string is safe to append without quoting.
114func (b *buffer) isStringQuoteSafe(val string) bool {

Callers 1

appendJSONMarshalMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected