2020-05-03 08:16:07 +00:00
|
|
|
package format
|
|
|
|
|
|
|
|
import (
|
2020-10-02 09:56:48 +00:00
|
|
|
"gopkg.in/yaml.v3"
|
2020-05-03 08:16:07 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type yamlWriter struct {
|
|
|
|
encoder *yaml.Encoder
|
|
|
|
}
|
|
|
|
|
|
|
|
func (y *yamlWriter) Write(in interface{}) (err error) {
|
|
|
|
return y.encoder.Encode(in)
|
|
|
|
}
|