Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( JSONExt = ".json" YAMLExt = ".yaml" GZIPExt = ".gz" )
View Source
var Exts = []string{ JSONExt, YAMLExt, ".yml", }
Exts contains a list of all the valid marshalable extension types.
View Source
var Marshalers map[string]Marshaler
Marshalers is a map of extension to a Marshaler object for that extension.
Functions ¶
func IsCompressed ¶ added in v3.33.2
IsCompressed returns if data is zip compressed.
Types ¶
type Marshaler ¶
type Marshaler interface { Marshal(v interface{}) ([]byte, error) Unmarshal(data []byte, v interface{}) error }
Marshaler is a type that knows how to marshal and unmarshal data in one format.
var JSON Marshaler = &jsonMarshaler{}
JSON is a Marshaler that marshals and unmarshals JSON with indented printing.
var YAML Marshaler = &yamlMarshaler{}
Click to show internal directories.
Click to hide internal directories.