Skip to content

Instantly share code, notes, and snippets.

@tanan
Created October 4, 2018 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanan/a8c6ff792b0a3d2aab47db59873ee383 to your computer and use it in GitHub Desktop.
Save tanan/a8c6ff792b0a3d2aab47db59873ee383 to your computer and use it in GitHub Desktop.
// ReadMeshConfig gets mesh configuration from a config file
func ReadMeshConfig(filename string) (*meshconfig.MeshConfig, error) {
yaml, err := ioutil.ReadFile(filename)
if err != nil {
return nil, multierror.Prefix(err, "cannot read mesh config file")
}
return model.ApplyMeshConfigDefaults(string(yaml))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment