Commit 27252c20 authored by Geoff Simmons's avatar Geoff Simmons

Open files to be generated with truncation.

parent fab57f10
......@@ -71,7 +71,8 @@ func replIllegal(ill []byte) []byte {
// WriteTemplate generates a VCL file at path to implement spec, using
// the template.
func (spec Spec) WriteTemplate(tmpl *template.Template, path string) error {
file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE, 0644)
file, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC,
0644)
if err != nil {
return err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment