From c8557dc00bd93ce8ecf0bb724856a320e129c71b Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Mon, 4 Jan 2021 11:11:36 -0700 Subject: caddyfile: Introduce basic linting and fmt check (#3923) * caddyfile: Introduce basic linting and fmt check This will help encourage people to keep their Caddyfiles tidy. * Remove unrelated tests I am not sure that testing the output of warnings here is quite the right idea; these tests are just for syntax and parsing success. --- caddyconfig/configadapters.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'caddyconfig/configadapters.go') diff --git a/caddyconfig/configadapters.go b/caddyconfig/configadapters.go index 1918fa7..1665fa0 100644 --- a/caddyconfig/configadapters.go +++ b/caddyconfig/configadapters.go @@ -93,12 +93,6 @@ func JSONModuleObject(val interface{}, fieldName, fieldVal string, warnings *[]W return result } -// JSONIndent is used to JSON-marshal the final resulting Caddy -// configuration in a consistent, human-readable way. -func JSONIndent(val interface{}) ([]byte, error) { - return json.MarshalIndent(val, "", "\t") -} - // RegisterAdapter registers a config adapter with the given name. // This should usually be done at init-time. It panics if the // adapter cannot be registered successfully. -- cgit v1.2.3