Awesome
expand
expand
package provides convenient functions to apply func os.Expand
efficiently.
Import
import "github.com/k1LoW/expand"
Usage
c := &Config{}
p := "config.yml"
buf, err := os.ReadFile(p)
if err != nil {
return err
}
if err := yaml.Unmarshal(expand.ExpandenvYAMLBytes(buf), c); err != nil {
return err
}