Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitTestMode ¶
InitTestMode will set the YAML instance to mockInstance.
Note: this function for testing purposes only. After executing InitTestMode, whenever your unit tests execute Instance it will call mockInstance.
Types ¶
type YAML ¶ added in v1.0.1
type YAML interface { // Marshal is used to encode the data from v. // // Note: v can be a struct or a ptr struct (*struct). Marshal(v interface{}) ([]byte, error) // MarshalWrite is used to encode data from v and write the encoded data to destPath. // // Note: v can be a struct or a ptr struct (*struct). MarshalWrite(destPath string, v interface{}) error // Unmarshal is used to store the encoded data to v. // // Note: v must be a ptr struct (*struct). Unmarshal(data []byte, v interface{}) error // UnmarshalRead is used to read the encoded data from srcPath and store the encoded data to v. // // Note: v must be a ptr struct (*struct). UnmarshalRead(srcPath string, v interface{}) error }
YAML is an interface primarily used by Instance.
Click to show internal directories.
Click to hide internal directories.