File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ type nginxVhostConf struct {
181181func (nvf * nginxVhostFactory ) createHost (conf * nginxVhostConf ) error {
182182 // Open vhost file for writing template
183183 p := filepath .Join (nginxVhostAvailableDir , conf .Hostname )
184- _ , err := os .OpenFile (p , os .O_WRONLY , 0644 )
184+ f , err := os .OpenFile (p , os .O_WRONLY , 0644 )
185185 if err != nil {
186186 return fmt .Errorf ("could not open %s for writing: %s" , p , err )
187187 }
@@ -193,7 +193,7 @@ func (nvf *nginxVhostFactory) createHost(conf *nginxVhostConf) error {
193193 }
194194
195195 // Render template with config and write to file
196- if err := t .Execute (os . Stdout , conf ); err != nil {
196+ if err := t .Execute (f , conf ); err != nil {
197197 return fmt .Errorf ("could not write nginx vhost template to file: %s" , err )
198198 }
199199
You can’t perform that action at this time.
0 commit comments