internal/mcp: pointerize all the things
Use pointers for the protocol's struct types, to future-proof against them getting large. Change-Id: I55b204080a41c8140539697ba264e502e912e613 Reviewed-on: https://go-review.googlesource.com/c/tools/+/672575 Reviewed-by: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
7b100d7b30
commit
02fa1b3ea6
1 changed files with 137 additions and 98 deletions
|
|
@ -138,6 +138,14 @@ func (s *Schema) String() string {
|
|||
return "<anonymous schema>"
|
||||
}
|
||||
|
||||
// ResolvedRef returns the Schema to which this schema's $ref keyword
|
||||
// refers, or nil if it doesn't have a $ref.
|
||||
// It returns nil if this schema has not been resolved, meaning that
|
||||
// [Schema.Resolve] was called on it or one of its ancestors.
|
||||
func (s *Schema) ResolvedRef() *Schema {
|
||||
return s.resolvedRef
|
||||
}
|
||||
|
||||
// json returns the schema in json format.
|
||||
func (s *Schema) json() string {
|
||||
data, err := json.MarshalIndent(s, "", " ")
|
||||
|
|
|
|||
Loading…
Reference in a new issue