diff options
author | Matthew Holt <[email protected]> | 2016-06-20 18:25:31 -0600 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2016-06-20 18:25:42 -0600 |
commit | 937654d1e0d39731a20844ce33c6336813117306 (patch) | |
tree | b26cc1c80f7b915677792eb1f96b01c865f84f64 /caddyfile/parse.go | |
parent | 33aba7eb91f9f8ec72fdd89a8edc73ec4bf38186 (diff) | |
download | caddy-937654d1e0d39731a20844ce33c6336813117306.tar.gz caddy-937654d1e0d39731a20844ce33c6336813117306.zip |
Set host and port on address if specified via flag (fixes #888)
Also fixed a few typos and renamed caddyfile.ServerBlocks() to
caddyfile.Parse().
Diffstat (limited to 'caddyfile/parse.go')
-rw-r--r-- | caddyfile/parse.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/caddyfile/parse.go b/caddyfile/parse.go index b3b851d5c..6d8f1588e 100644 --- a/caddyfile/parse.go +++ b/caddyfile/parse.go @@ -7,13 +7,13 @@ import ( "strings" ) -// ServerBlocks parses the input just enough to group tokens, -// in order, by server block. No further parsing is performed. +// Parse parses the input just enough to group tokens, in +// order, by server block. No further parsing is performed. // Server blocks are returned in the order in which they appear. // Directives that do not appear in validDirectives will cause // an error. If you do not want to check for valid directives, // pass in nil instead. -func ServerBlocks(filename string, input io.Reader, validDirectives []string) ([]ServerBlock, error) { +func Parse(filename string, input io.Reader, validDirectives []string) ([]ServerBlock, error) { p := parser{Dispenser: NewDispenser(filename, input), validDirectives: validDirectives} blocks, err := p.parseAll() return blocks, err |