diff options
author | Mike Pulaski <[email protected]> | 2016-09-05 18:34:32 +0200 |
---|---|---|
committer | Mike Pulaski <[email protected]> | 2016-09-05 18:34:32 +0200 |
commit | 635714fe383af210f8aa09ba5f1d9aa2bfb69a62 (patch) | |
tree | 4f64c2201da4704e94cf62b9070b96865e0937a0 /caddy.go | |
parent | a12230419611951692ee0bb5cd407e6e884be2c2 (diff) | |
download | caddy-635714fe383af210f8aa09ba5f1d9aa2bfb69a62.tar.gz caddy-635714fe383af210f8aa09ba5f1d9aa2bfb69a62.zip |
Caddyfiles read from STDIN now have server types associated with them. Fixes #1090.
Diffstat (limited to 'caddy.go')
-rw-r--r-- | caddy.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -388,7 +388,7 @@ func (i *Instance) Wait() { // but the Input value will be nil. An error is only returned // if there was an error reading the pipe, even if the length // of what was read is 0. -func CaddyfileFromPipe(f *os.File) (Input, error) { +func CaddyfileFromPipe(f *os.File, serverType string) (Input, error) { fi, err := f.Stat() if err == nil && fi.Mode()&os.ModeCharDevice == 0 { // Note that a non-nil error is not a problem. Windows @@ -402,8 +402,9 @@ func CaddyfileFromPipe(f *os.File) (Input, error) { return nil, err } return CaddyfileInput{ - Contents: confBody, - Filepath: f.Name(), + Contents: confBody, + Filepath: f.Name(), + ServerTypeName: serverType, }, nil } |