MCPcopy
hub / github.com/caddyserver/caddy / isNamedRoute

Method isNamedRoute

caddyconfig/caddyfile/parse.go:722–729  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

720}
721
722func (p *parser) isNamedRoute() (bool, string) {
723 keys := p.block.Keys
724 // A named route block is a single key with parens, prefixed with &.
725 if len(keys) == 1 && strings.HasPrefix(keys[0].Text, "&(") && strings.HasSuffix(keys[0].Text, ")") {
726 return true, strings.TrimSuffix(keys[0].Text[2:], ")")
727 }
728 return false, ""
729}
730
731func (p *parser) isSnippet() (bool, string) {
732 keys := p.block.Keys

Callers 1

beginMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected