util

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalDeterministic

func MarshalDeterministic(v any) ([]byte, error)

MarshalDeterministic 确定性地序列化为 JSON 对于 map 类型,会按 key 字典序排序

func MarshalDeterministicIndent

func MarshalDeterministicIndent(v any, prefix, indent string) ([]byte, error)

MarshalDeterministicIndent 确定性地序列化为格式化的 JSON

func MarshalDeterministicToBuffer

func MarshalDeterministicToBuffer(v any, buf *bytes.Buffer) error

MarshalDeterministicToBuffer 确定性地序列化到 buffer(减少内存分配)

Types

This section is empty.

Jump to

Keyboard shortcuts

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