code: func prefixFromUserAgent(u string) string {
  	m := strings.Split(u, "/")[0]
  	buf := bytes.NewBuffer(nil)
  	for _, r := range m {
  		// Ignore non-printable characters
  		if !unicode.IsPrint(r) {
  			continue
  		}
  		// Only append if we have room for it
  		if buf.Len()+utf8.RuneLen(r) > validation.FieldManagerMaxLength {
  			break
  		}
  		buf.WriteRune(r)
  	}
  	return buf.String()
  }
docs: // prefixFromUserAgent takes the characters preceding the first /, quote
  // unprintable character and then trim what's beyond the
  // FieldManagerMaxLength limit.