code: func readLPString(buf []byte, t Type) (string, int, error) {
  	if len(buf) < 2 {
  		return "", 0, makeError(t, "insufficient buffer size, expected 2, got %d", len(buf))
  	}
  
  	n, total := 0, 0
  
  	n = int(binary.BigEndian.Uint16(buf))
  	total += 2
  	total += n
  
  	if len(buf) < total {
  		return "", total, makeError(t, "insufficient buffer size, expected %d, got %d", total, len(buf))
  	}
  
  	return string(buf[2:total]), total, nil
  }
docs: // read length prefixed string