{% import "sort" %} {% import "path" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} Subhyphae links are recursive. It may end up looking like that if drawn with pseudographics: ╔══════════════╗ ║Foo ║ The presented hyphae are foo and foo/bar ║╔════════════╗║ ║║Bar ║║ ║╚════════════╝║ ╚══════════════╝ {% func childHTML(c *child) %} {% code sort.Slice(c.children, func(i, j int) bool { return c.children[i].name < c.children[j].name }) %}
  • {%s util.BeautifulName(path.Base(c.name)) %} {% if len(c.children) > 0 %} {% endif %}
  • {% endfunc %} {% func siblingHTML(s *sibling) %}
  • {%s util.BeautifulName(path.Base(s.name)) %} {% if s.directSubhyphaeCount > 0 %} {%d s.directSubhyphaeCount %} {% endif %} {% if s.indirectSubhyphaeCount > 0 %} ({%d s.indirectSubhyphaeCount %}) {% endif %}
  • {% endfunc %}