sphinx-autoapi/autoapi/templates/go/base_member.rst

27 lines
814 B
ReStructuredText
Raw Normal View History

2015-05-29 22:02:27 +00:00
.. go:{{ obj.ref_type }}:: {{ obj.name }}
2015-05-31 01:32:43 +00:00
{%- if obj.type == 'func' -%}
{%- set argjoin = joiner(', ') -%}
({%- for param in obj.parameters -%}
{{ argjoin() }}{{ param.name }} {{ param.type }}
{%- endfor -%})
2015-05-31 01:32:43 +00:00
{%- endif %}
2015-05-29 22:02:27 +00:00
{% macro render() %}{{ obj.docstring }}{% endmacro %}
{{ render()|indent(4) }}
{# Don't define parameter description here, that can be done in the block
above #}
2015-05-31 01:32:43 +00:00
{% for param in obj.parameters %}
2015-05-29 22:02:27 +00:00
:type {{ param.name }}: {{ param.type }}
{%- endfor %}
{%- if obj.returns %}
:rtype: {{ obj.returns.type }}
2015-05-29 22:02:27 +00:00
{%- endif %}
2015-05-31 01:42:06 +00:00
{% if obj.children -%}
{%- for child in obj.children|sort %}
{% macro render_child() %}{{ child.render() }}{% endmacro %}
{{ render_child()|indent(4) }}
{%- endfor %}
{%- endif %}