mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bac82073d0
1 changed files with 5 additions and 1 deletions
|
@ -123,7 +123,11 @@ func loadConfig(configFile, adapterName string) ([]byte, string, error) {
|
||||||
var cfgAdapter caddyconfig.Adapter
|
var cfgAdapter caddyconfig.Adapter
|
||||||
var err error
|
var err error
|
||||||
if configFile != "" {
|
if configFile != "" {
|
||||||
config, err = ioutil.ReadFile(configFile)
|
if configFile == "-" {
|
||||||
|
config, err = ioutil.ReadAll(os.Stdin)
|
||||||
|
} else {
|
||||||
|
config, err = ioutil.ReadFile(configFile)
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", fmt.Errorf("reading config file: %v", err)
|
return nil, "", fmt.Errorf("reading config file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue