utils

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

func Intern

func Intern(buf []byte) string

func Marshal

func Marshal(data interface{}) ([]byte, error)

func MarshalToBuffer

func MarshalToBuffer(data interface{}, buf *bytes.Buffer) error

func Unmarshal

func Unmarshal[T any](data []byte, target *T) error

func UnmarshalConfig

func UnmarshalConfig[T any](config interface{}, target *T) error

Types

type JSONBufferPool

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

func (*JSONBufferPool) Get

func (p *JSONBufferPool) Get() *bytes.Buffer

func (*JSONBufferPool) Put

func (p *JSONBufferPool) Put(buf *bytes.Buffer)

Jump to

Keyboard shortcuts

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