// {{ go_type_name }} is a structured error type.
type {{ go_type_name }} struct {
	Code    string
	Message string
{% if has_methods %}
{% for m in methods %}
	{{ m.field_name }} {{ m.go_type }}
{% endfor %}
{% endif %}
}

func (e {{ go_type_name }}) Error() string { return e.Message }
