fix: add involves edge from task to agent:nomos at creation
Plus sync vendor directory for Docker build compatibility.
This commit is contained in:
41
vendor/github.com/getkin/kin-openapi/openapi3/visited.go
generated
vendored
Normal file
41
vendor/github.com/getkin/kin-openapi/openapi3/visited.go
generated
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
package openapi3
|
||||
|
||||
func newVisited() visitedComponent {
|
||||
return visitedComponent{
|
||||
header: make(map[*Header]struct{}),
|
||||
schema: make(map[*Schema]struct{}),
|
||||
}
|
||||
}
|
||||
|
||||
type visitedComponent struct {
|
||||
header map[*Header]struct{}
|
||||
schema map[*Schema]struct{}
|
||||
}
|
||||
|
||||
// resetVisited clears visitedComponent map
|
||||
// should be called before recursion over doc *T
|
||||
func (doc *T) resetVisited() {
|
||||
doc.visited = newVisited()
|
||||
}
|
||||
|
||||
// isVisitedHeader returns `true` if the *Header pointer was already visited
|
||||
// otherwise it returns `false`
|
||||
func (doc *T) isVisitedHeader(h *Header) bool {
|
||||
if _, ok := doc.visited.header[h]; ok {
|
||||
return true
|
||||
}
|
||||
|
||||
doc.visited.header[h] = struct{}{}
|
||||
return false
|
||||
}
|
||||
|
||||
// isVisitedHeader returns `true` if the *Schema pointer was already visited
|
||||
// otherwise it returns `false`
|
||||
func (doc *T) isVisitedSchema(s *Schema) bool {
|
||||
if _, ok := doc.visited.schema[s]; ok {
|
||||
return true
|
||||
}
|
||||
|
||||
doc.visited.schema[s] = struct{}{}
|
||||
return false
|
||||
}
|
||||
Reference in New Issue
Block a user