safebuffer

package
v1.9.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

Buffer is a concurrent-safe bytes.Buffer.

func (*Buffer) Reset

func (s *Buffer) Reset()

Reset resets the buffer to be empty, but it retains the underlying storage for use by future writes. Reset is the same as Truncate(0).

Proxify buffer.Reset.

func (*Buffer) String

func (s *Buffer) String() string

String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns "<nil>".

String interface implementation.

func (*Buffer) Write

func (s *Buffer) Write(p []byte) (int, error)

Write appends the contents of p to the buffer, growing the buffer as needed. It returns the number of bytes written.

io.Writer interface implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL