Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidUnmarshaler = Format{"INVALID", nil}
InvalidUnmarshaler is used when no valid unmarshaler can be found
Functions ¶
func RegisterDataFormat ¶
func RegisterDataFormat(name string, unmarshaler Unmarshaler)
RegisterDataFormat manages input format for data
Types ¶
type Format ¶
type Format struct { Name string Unmarshaler Unmarshaler }
Format is a decoding format
func FindBest ¶
FindBest searches for the best format for decoding the file This is done by searching the filename suffix(usually the extension) and the prefix
func Registered ¶
func Registered() []Format
Registered returns a slice with all the registered formats
type Unmarshaler ¶
type Unmarshaler interface { //Unmarshal takes the raw data as input and decodes it into the interface{} Unmarshal(raw []byte) (interface{}, error) }
Unmarshaler is used to unmarshal the data
Click to show internal directories.
Click to hide internal directories.