MCPcopy Create free account
hub / github.com/goadesign/goa / Append

Method Append

codegen/service/service_data.go:706–718  ·  view source on GitHub ↗

Append appends a scheme data to schemes only if it doesn't exist.

(d *SchemeData)

Source from the content-addressed store, hash-verified

704
705// Append appends a scheme data to schemes only if it doesn't exist.
706func (s SchemesData) Append(d *SchemeData) SchemesData {
707 found := false
708 for _, se := range s {
709 if se.SchemeName == d.SchemeName {
710 found = true
711 break
712 }
713 }
714 if found {
715 return s
716 }
717 return append(s, d)
718}
719
720// DedupeByType returns a new SchemesData slice that is deduplicated by scheme
721// type.

Callers 2

buildMethodDataMethod · 0.95
analyzeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected