aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcui fliter <[email protected]>2023-04-25 23:54:42 +0800
committerGitHub <[email protected]>2023-04-25 09:54:42 -0600
commit3443a8a056c7fe1a67cbf64f7e7f8acdc3762416 (patch)
treefe256e7ee151aeebba2d6f65a574defba7710552
parent2943c41884278ec5fc44bcb55d2b9b088838cdc2 (diff)
downloadcaddy-3443a8a056c7fe1a67cbf64f7e7f8acdc3762416.tar.gz
caddy-3443a8a056c7fe1a67cbf64f7e7f8acdc3762416.zip
fix some comments (#5508)
Signed-off-by: cui fliter <[email protected]>
-rw-r--r--modules/caddyhttp/celmatcher.go2
-rw-r--r--modules/caddyhttp/fileserver/matcher.go2
-rw-r--r--modules/caddyhttp/templates/tplcontext.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go
index fbc5f5a20..cc87146ec 100644
--- a/modules/caddyhttp/celmatcher.go
+++ b/modules/caddyhttp/celmatcher.go
@@ -496,7 +496,7 @@ func celMatcherStringMacroExpander(funcName string) parser.MacroExpander {
}
}
-// celMatcherStringMacroExpander validates that the macro is called a single
+// celMatcherJSONMacroExpander validates that the macro is called a single
// map literal argument.
//
// The following function call is returned: <funcName>(request, arg)
diff --git a/modules/caddyhttp/fileserver/matcher.go b/modules/caddyhttp/fileserver/matcher.go
index 1cdc87c7f..f42445fbf 100644
--- a/modules/caddyhttp/fileserver/matcher.go
+++ b/modules/caddyhttp/fileserver/matcher.go
@@ -558,7 +558,7 @@ func indexFold(haystack, needle string) int {
return -1
}
-// isCELMapLiteral returns whether the expression resolves to a map literal containing
+// isCELTryFilesLiteral returns whether the expression resolves to a map literal containing
// only string keys with or a placeholder call.
func isCELTryFilesLiteral(e *exprpb.Expr) bool {
switch e.GetExprKind().(type) {
diff --git a/modules/caddyhttp/templates/tplcontext.go b/modules/caddyhttp/templates/tplcontext.go
index c500381e0..fb00f4fe0 100644
--- a/modules/caddyhttp/templates/tplcontext.go
+++ b/modules/caddyhttp/templates/tplcontext.go
@@ -397,7 +397,7 @@ func (c TemplateContext) funcFileExists(filename string) (bool, error) {
return false, nil
}
-// funcStat returns Stat of a filename
+// funcFileStat returns Stat of a filename
func (c TemplateContext) funcFileStat(filename string) (fs.FileInfo, error) {
if c.Root == nil {
return nil, fmt.Errorf("root file system not specified")