diff options
author | Matt Holt <[email protected]> | 2020-02-25 22:00:33 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-25 22:00:33 -0700 |
commit | 5d97522d18da39cd3f9dd309774a5ad2c51f4c51 (patch) | |
tree | 8d90c0200edbf2f252a7d57c6f65255a0e38b9e0 /replacer_test.go | |
parent | f6b9cb7122c670ae063a9049455ec99edf0dc8be (diff) | |
download | caddy-5d97522d18da39cd3f9dd309774a5ad2c51f4c51.tar.gz caddy-5d97522d18da39cd3f9dd309774a5ad2c51f4c51.zip |
v2: 'log' directive for Caddyfile, and debug mode (#3052)
* httpcaddyfile: Begin implementing log directive, and debug mode
For now, debug mode just sets the log level for all logs to DEBUG
(unless a level is specified explicitly).
* httpcaddyfile: Finish 'log' directive
Also rename StringEncoder -> SingleFieldEncoder
* Fix minor bug in replacer (when vals are empty)
Diffstat (limited to 'replacer_test.go')
-rw-r--r-- | replacer_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/replacer_test.go b/replacer_test.go index 42e9ee1f7..4b5619451 100644 --- a/replacer_test.go +++ b/replacer_test.go @@ -67,6 +67,11 @@ func TestReplacer(t *testing.T) { input: `{{}`, expect: "", }, + { + input: `{unknown}`, + empty: "-", + expect: "-", + }, } { actual := rep.ReplaceAll(tc.input, tc.empty) if actual != tc.expect { |