apigen/lib/processYaml.go

16 lines
229 B
Go
Raw Permalink Normal View History

2021-09-06 12:54:09 +00:00
package lib
2021-01-30 09:53:34 +00:00
import (
"gopkg.in/yaml.v2"
"io/ioutil"
)
func processYaml(dst string, opts interface{}) error {
bs, err := yaml.Marshal(api)
if err != nil {
return err
}
err = ioutil.WriteFile(dst, bs, 0600)
return err
}