MCPcopy
hub / github.com/danielgtaylor/huma / With

Method With

validate.go:124–129  ·  view source on GitHub ↗

With is shorthand for push, convert to string, and pop. This is useful when you want the location of a field given a path buffer as a prefix. pb.Push("foo") pb.With("bar") // returns foo.bar

(s string)

Source from the content-addressed store, hash-verified

122// pb.Push("foo")
123// pb.With("bar") // returns foo.bar
124func (b *PathBuffer) With(s string) string {
125 b.Push(s)
126 tmp := b.String()
127 b.Pop()
128 return tmp
129}
130
131// WithIndex is short for push index, convert to string, and pop. This is useful
132// when you want the location of the index given a path buffer as a prefix.

Callers 6

ResolveMethod · 0.80
ResolveMethod · 0.80
ResolveMethod · 0.80
ResolveMethod · 0.80
ResolveMethod · 0.80
ResolveMethod · 0.80

Calls 3

PushMethod · 0.95
StringMethod · 0.95
PopMethod · 0.95

Tested by 6

ResolveMethod · 0.64
ResolveMethod · 0.64
ResolveMethod · 0.64
ResolveMethod · 0.64
ResolveMethod · 0.64
ResolveMethod · 0.64