Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DurationSecondToInt ¶ added in v2.12.0
func GetWriter ¶
func GetWriter(consumer func(string)) io.WriteCloser
GetWriter creates an io.Writer that will actually split by line and format by LogConsumer
func StringToBool ¶ added in v2.3.0
StringToBool converts a string to a boolean ignoring errors
Types ¶
type SafeBuffer ¶ added in v2.12.0
type SafeBuffer struct {
// contains filtered or unexported fields
}
SafeBuffer is a thread safe version of bytes.Buffer
func (*SafeBuffer) Bytes ¶ added in v2.12.0
func (b *SafeBuffer) Bytes() []byte
Bytes is a thread safe version of bytes.Buffer::Bytes
func (*SafeBuffer) Read ¶ added in v2.12.0
func (b *SafeBuffer) Read(p []byte) (n int, err error)
Read is a thread safe version of bytes.Buffer::Read
func (*SafeBuffer) RequireEventuallyContains ¶ added in v2.12.0
func (b *SafeBuffer) RequireEventuallyContains(t testing.TB, v string)
RequireEventuallyContains is a thread safe eventual checker for the buffer content
func (*SafeBuffer) String ¶ added in v2.12.0
func (b *SafeBuffer) String() string
String is a thread safe version of bytes.Buffer::String
type Set ¶ added in v2.16.0
type Set[T comparable] map[T]struct{}
func NewSet ¶ added in v2.21.0
func NewSet[T comparable](v ...T) Set[T]
Click to show internal directories.
Click to hide internal directories.