code: func typeOfKey(k string) string {
  	c := strings.Index(k, ":")
  	p := strings.Index(k, "|")
  	if c < 0 && p < 0 {
  		return ""
  	}
  	if c < 0 {
  		return k[:p]
  	}
  	if p < 0 {
  		return k[:c]
  	}
  	min := c
  	if p < min {
  		min = p
  	}
  	return k[:min]
  }
docs: // type of key returns the identifier in k before the first ":" or "|".
  // (Originally we packed keys by hand and there are a mix of styles)