go_import_mappings

Go import mappings are used to specify how we map an apidoc import URL to a go import path.

The value is a space separated list of key/value pairs that map namespaces (e.g. me.apidoc) to import paths in go (e.g. github.com/mbryzek/apidoc). The go client generator looks at all of the apidoc imports and translates the apidoc URLs into go import paths, using the mappings where available.

For example, a mapping of “me.apidoc:github.com/mbryzek/apidoc” will translate import URLs starting with me.apidoc to go import URLs starting with github.com/mbryzek/apidoc.

Example value

"me.apidoc:github.com/mbryzek/apidoc"

To specify multiple mappings, use a space to separate each

"me.apidoc:github.com/mbryzek/apidoc io.flow:github.com/flowcommerce/go"

Code Generators Using this Attribute

Service Key Name Language Attributes Description
https://generator.apibuilder.io go_1_5_client go 1.5 client Go go_import_mappings

Client based on native go 1.5 net/http libraries.