code: func Expand(template string, match map[string]string, subs ...string) string {
  	var p []byte
  	var i int
  	for {
  		i = strings.Index(template, "{")
  		if i < 0 {
  			break
  		}
  		p = append(p, template[:i]...)
  		template = template[i+1:]
  		i = strings.Index(template, "}")
  		if s, ok := match[template[:i]]; ok {
  			p = append(p, s...)
  		} else {
  			j, _ := strconv.Atoi(template[:i])
  			if j >= len(subs) {
  				p = append(p, []byte("Missing")...)
  			} else {
  				p = append(p, subs[j]...)
  			}
  		}
  		template = template[i+1:]
  	}
  	p = append(p, template...)
  	return string(p)
  }
docs: // Expand replaces {k} in template with match[k] or subs[atoi(k)] if k is not in match.