Merge remote-tracking branch 'rtfd/go-templates' into go-parsed-example

This commit is contained in:
Eric Holscher 2015-05-29 15:04:34 -07:00
commit 1547210f49
7 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,11 @@
.. go:{{ obj.ref_type }}:: {{ obj.name }}
{%- for param in obj.parameters %}
:param {{ param.name }}: {{ param.desc }}
{%- if param.type %}
:type {{ param.name }}: {{ param.type }}
{%- endif %}
{%- endfor %}
{%- if obj.returns %}
:rtype: {{ obj.returns.id }}
{%- endif %}

View File

@ -0,0 +1 @@
{% extends "go/base_member.rst" %}

View File

@ -0,0 +1 @@
{% extends "go/base_member.rst" %}

View File

@ -0,0 +1 @@
{% extends "go/base_member.rst" %}

View File

@ -0,0 +1,25 @@
.. go:package:: {{ obj.name }}
{% block toc %}
{%- if obj.children %}
.. toctree::
:maxdepth: 4
{% for item in obj.children|sort %}
/autoapi/{{ item.id.split('.')|join('/') }}/index
{%- endfor %}
{%- endif %}
{% endblock %}
{% if obj.docstring %}
{{ obj.docstring }}
{% endif %}
{% block content %}
{%- for obj_item in obj.item_map.get(item_type, []) %}
{% macro render() %}{{ obj_item.render() }}{% endmacro %}
{{ render()|indent(4) }}
{%- endfor %}
{% endblock %}

View File

@ -0,0 +1 @@
{% extends "go/base_member.rst" %}

View File

@ -0,0 +1 @@
{% extends "go/base_member.rst" %}