github.com/instill-ai/component@v0.16.0-beta/pkg/jsonref/options.go (about) 1 // The following code is based on lestrrat's work, available at https://github.com/lestrrat-go/jsref. 2 3 package jsonref 4 5 import "github.com/lestrrat-go/option" 6 7 type Option = option.Interface 8 9 type identRecursiveResolution struct{} 10 11 // WithRecursiveResolution allows ou to enable recursive resolution 12 // on the *result* data structure. This means that after resolving 13 // the JSON reference in the structure at hand, it does another 14 // pass at resolving the entire data structure. Depending on your 15 // structure and size, this may incur significant cost. 16 // 17 // Please note that recursive resolution of the result is still 18 // experimental. If you find problems, please submit a pull request 19 // with a failing test case. 20 func WithRecursiveResolution(b bool) Option { 21 return option.New(identRecursiveResolution{}, b) 22 }