code: func (s *shortcodeTemplates) compareVariants(a, b []string) int {
  
  	weight := 0
  	for i, av := range a {
  		bv := b[i]
  		if av == bv {
  			weight++
  		} else {
  			weight--
  		}
  	}
  	return weight
  }
docs: // calculate a weight for two string slices of same lenght.
  // higher value means "better match".