bytes

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 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 SharedBuffer

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

SharedBuffer is a goroutine safe bytes.Buffer Author: https://gist.github.com/arkan/5924e155dbb4254b64614069ba0afd81 Changes: - buffer field is now a pointer - Renamed to SharedBuffer - Added NewSharedBuffer

func NewSharedBuffer

func NewSharedBuffer() *SharedBuffer

func (*SharedBuffer) String

func (s *SharedBuffer) String() string

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

func (*SharedBuffer) Unshared

func (s *SharedBuffer) Unshared() *std_bytes.Buffer

func (*SharedBuffer) Write

func (s *SharedBuffer) Write(p []byte) (n int, err error)

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

Jump to

Keyboard shortcuts

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