Skip to content

Instantly share code, notes, and snippets.

@kasvith
Created July 23, 2019 06:44
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 kasvith/213daa60fa07bdef64703e3779591c61 to your computer and use it in GitHub Desktop.
Save kasvith/213daa60fa07bdef64703e3779591c61 to your computer and use it in GitHub Desktop.
Old way
// define default values, other resources in default package
package defaults
var ConfigTemplate = []byte(`
// content goes here
`)
// In some another package
func somefunc(){
ioutil.WriteFile("/path/to/dest", defaults.ConfigTemplate, os.ModePerm)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment