// String joins the components of the domain name into a single string.
// Empty labels are skipped.
//
// Examples:
//
// 	DomainName{"com", "example"}.String()
//	// example.com
// 	DomainName{"com", "example", "www"}.String()
//	// www.example.com
//
429787
func (d *DomainName) String() string {
	switch {
	case d.TLD == "":
		return ""
	case d.SLD == "":
		return d.TLD
	case d.TRD == "":
		return d.SLD + "." + d.TLD
	default:
		return d.TRD + "." + d.SLD + "." + d.TLD
	}
}
1214831
func (internet Internet) DomainName(v reflect.Value) (interface{}, error) {
	return internet.domainName(), nil
}
847315
func (host Host) String() string {
	if !host.IsPortSet {
		return host.Name
	}

	return net.JoinHostPort(host.Name, host.Port.String())
}
576513
func (m *ExternalCAOption) String() string {
	externalCAs := []string{}
	for _, externalCA := range m.values {
		repr := fmt.Sprintf("%s: %s", externalCA.Protocol, externalCA.URL)
		externalCAs = append(externalCAs, repr)
	}
	return strings.Join(externalCAs, ", ")
}
730717
func (a Address) String() string {
	if a.Name == "" {
		return a.Address
	}
	return "\"" + a.Name + "\" <" + a.Address + ">"
}
1124786
func (na *NetAddress) String() string {
	if na == nil {
		return "<nil-NetAddress>"
	}
	if na.str == "" {
		addrStr := na.DialString()
		if na.ID != "" {
			addrStr = IDAddressString(na.ID, addrStr)
		}
		na.str = addrStr
	}
	return na.str
}
172839
func (gtid MariadbGTID) String() string {
	return fmt.Sprintf("%d-%d-%d", gtid.Domain, gtid.Server, gtid.Sequence)
}
295806
func (p LabelPrefix) String() string {
	s := fmt.Sprintf("%s:%s", p.Source, p.Prefix)
	if p.Ignore {
		s = "!" + s
	}

	return s
}
334114
func (sp *Subscribe) String() string {
	var subscriptions []string

	for _, t := range sp.Subscriptions {
		subscriptions = append(subscriptions, t.String())
	}

	return fmt.Sprintf("<Subscribe ID=%d Subscriptions=[%s]>",
		sp.ID, strings.Join(subscriptions, ", "))
}
181254
func (p *PortBinding) String() string {
	ret := fmt.Sprintf("%s/", p.Proto)
	if p.IP != nil {
		ret += p.IP.String()
	}
	ret = fmt.Sprintf("%s:%d/", ret, p.Port)
	if p.HostIP != nil {
		ret += p.HostIP.String()
	}
	ret = fmt.Sprintf("%s:%d", ret, p.HostPort)
	return ret
}
1336692
func (gtidSet MariadbGTIDSet) String() string {
	s := make([]string, len(gtidSet))
	for i, gtid := range gtidSet {
		s[i] = gtid.String()
	}
	return strings.Join(s, ",")
}
434968
func (u *User) String() string {
	if u.UserName != "" {
		return u.UserName
	}

	name := u.FirstName
	if u.LastName != "" {
		name += " " + u.LastName
	}

	return name
}
919810
func (s *Source) String() string {
	return fmt.Sprintf("%s=%s (%s)", s.Alias, s.URL.String(), s.mediaType)
}
888633
func (o Version) String() string {
	switch o {
	case VersionOne:
		return "Version 1: Based on a 60 Bit Timestamp."
	case VersionTwo:
		return "Version 2: Based on DCE security domain and 60 bit timestamp."
	case VersionThree:
		return "Version 3: Namespace UUID and unique names hashed by MD5."
	case VersionFour:
		return "Version 4: Crypto-random generated."
	case VersionFive:
		return "Version 5: Namespace UUID and unique names hashed by SHA-1."
	default:
		return "Unknown: Not supported"
	}
}
1281500
func (sf *ScalarFunction) String() string {
	result := sf.FuncName.L + "("
	for i, arg := range sf.GetArgs() {
		result += arg.String()
		if i+1 != len(sf.GetArgs()) {
			result += ", "
		}
	}
	result += ")"
	return result
}
32174
func (c Flags) String(name string) string {
	f := c.Get(name)
	if f == nil {
		return ""
	}
	return *f.Value.(*string) //*f.Value if string
}
962575
func (s *Sample) string() string {
	ss := []string{}
	var sv string
	for _, v := range s.Value {
		sv = fmt.Sprintf("%s %10d", sv, v)
	}
	sv = sv + ": "
	for _, l := range s.Location {
		sv = sv + fmt.Sprintf("%d ", l.ID)
	}
	ss = append(ss, sv)
	const labelHeader = "                "
	if len(s.Label) > 0 {
		ss = append(ss, labelHeader+labelsToString(s.Label))
	}
	if len(s.NumLabel) > 0 {
		ss = append(ss, labelHeader+numLabelsToString(s.NumLabel, s.NumUnit))
	}
	return strings.Join(ss, "\n")
}