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' -%}
|
2015-05-31 21:38:17 +00:00
|
|
|
{%- 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
|
|
|
|
2015-05-30 23:28:59 +00:00
|
|
|
{% macro render() %}{{ obj.docstring }}{% endmacro %}
|
|
|
|
{{ render()|indent(4) }}
|
|
|
|
|
2015-05-31 21:38:17 +00:00
|
|
|
{# 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 %}
|
2015-05-31 21:38:17 +00:00
|
|
|
: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 %}
|