MCPcopy
hub / github.com/google/mtail / IsComplete

Function IsComplete

internal/runtime/compiler/types/types.go:220–233  ·  view source on GitHub ↗

IsComplete returns true if the type and all its arguments have non-variable exemplars.

(t Type)

Source from the content-addressed store, hash-verified

218
219// IsComplete returns true if the type and all its arguments have non-variable exemplars.
220func IsComplete(t Type) bool {
221 switch v := t.Root().(type) {
222 case *Variable:
223 return false
224 case *Operator:
225 for _, a := range v.Args {
226 if !IsComplete(a) {
227 return false
228 }
229 }
230 return true
231 }
232 return false
233}
234
235// Builtin type constants.
236var (

Callers 2

VisitBeforeMethod · 0.92
StringMethod · 0.85

Calls 1

RootMethod · 0.65

Tested by

no test coverage detected