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

Function pkgWithDefault

http/codegen/service_data.go:2948–2953  ·  view source on GitHub ↗

pkgWithDefault returns the package name of the given location if not nil, def otherwise.

(loc *codegen.Location, def string)

Source from the content-addressed store, hash-verified

2946
2947// pkgWithDefault returns the package name of the given location if not nil, def otherwise.
2948func pkgWithDefault(loc *codegen.Location, def string) string {
2949 if loc == nil {
2950 return def
2951 }
2952 return loc.PackageName()
2953}
2954
2955// unmarshal initializes a data structure defined by target type from a data
2956// structure defined by source type. The attributes in the source data

Callers 7

analyzeMethod · 0.70
buildPayloadDataMethod · 0.70
buildResultDataMethod · 0.70
buildResponsesMethod · 0.70
buildErrorsDataMethod · 0.70
buildRequestBodyTypeMethod · 0.70
buildResponseBodyTypeMethod · 0.70

Calls 1

PackageNameMethod · 0.80

Tested by

no test coverage detected