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

Method closeCurlyBrace

caddyconfig/caddyfile/parse.go:715–720  ·  view source on GitHub ↗

closeCurlyBrace expects the current token to be a closing curly brace. This acts like an assertion because it returns an error if the token is not a closing curly brace. It does NOT advance the token.

()

Source from the content-addressed store, hash-verified

713// because it returns an error if the token is not
714// a closing curly brace. It does NOT advance the token.
715func (p *parser) closeCurlyBrace() error {
716 if p.Val() != "}" {
717 return p.SyntaxErr("}")
718 }
719 return nil
720}
721
722func (p *parser) isNamedRoute() (bool, string) {
723 keys := p.block.Keys

Callers 1

blockContentsMethod · 0.95

Calls 2

ValMethod · 0.80
SyntaxErrMethod · 0.80

Tested by

no test coverage detected