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

Function allTokens

caddyconfig/caddyfile/parse.go:63–65  ·  view source on GitHub ↗

allTokens lexes the entire input, but does not parse it. It returns all the tokens from the input, unstructured and in order. It may mutate input as it expands env vars.

(filename string, input []byte)

Source from the content-addressed store, hash-verified

61// It returns all the tokens from the input, unstructured
62// and in order. It may mutate input as it expands env vars.
63func allTokens(filename string, input []byte) ([]Token, error) {
64 return Tokenize(replaceEnvVars(input), filename)
65}
66
67// replaceEnvVars replaces all occurrences of environment variables.
68// It mutates the underlying array and returns the updated slice.

Callers 4

TestAllTokensFunction · 0.85
ParseFunction · 0.85
doSingleImportMethod · 0.85
NewTestDispenserFunction · 0.85

Calls 2

TokenizeFunction · 0.85
replaceEnvVarsFunction · 0.85

Tested by 1

TestAllTokensFunction · 0.68