// String returns "<version>/<storage-version>" string of the EtcdVersionPair.
513664
func (vp *EtcdVersionPair) String() string {
	return fmt.Sprintf("%s/%s", vp.version, vp.storageVersion)
}
1194515
func (k *ExtendedKey) String() string {
	if len(k.key) == 0 {
		return "zeroed extended key"
	}

	var childNumBytes [4]byte
	binary.BigEndian.PutUint32(childNumBytes[:], k.childNum)

	// The serialized format is:
	//   version (4) || depth (1) || parent fingerprint (4)) ||
	//   child num (4) || chain code (32) || key data (33) || checksum (4)
	serializedBytes := make([]byte, 0, serializedKeyLen+4)
	serializedBytes = append(serializedBytes, k.version...)
	serializedBytes = append(serializedBytes, k.depth)
	serializedBytes = append(serializedBytes, k.parentFP...)
	serializedBytes = append(serializedBytes, childNumBytes[:]...)
	serializedBytes = append(serializedBytes, k.chainCode...)
	if k.isPrivate {
		serializedBytes = append(serializedBytes, 0x00)
		serializedBytes = paddedAppend(32, serializedBytes, k.key)
	} else {
		serializedBytes = append(serializedBytes, k.pubKeyBytes()...)
	}

	checkSum := chainhash.DoubleHashB(serializedBytes)[:4]
	serializedBytes = append(serializedBytes, checkSum...)
	return base58.Encode(serializedBytes)
}
526820
func String() string {
	ver := "dev"
	if strings.Compare(Version, "") != 0 {
		ver = fmt.Sprintf("%s", Version)
	}
	if strings.Compare(BuildMetadata, "") != 0 {
		ver = fmt.Sprintf("%s+%s", ver, BuildMetadata)
	}
	return ver
}
1228005
func (meta debMetadata) VersionString() string {
	vsn := meta.Version
	if meta.Env.Buildnum != "" {
		vsn += "+build" + meta.Env.Buildnum
	}
	if meta.Distro != "" {
		vsn += "+" + meta.Distro
	}
	return vsn
}
873772
func (t DeviceKey) String() string {
	appID := simpleWildcard
	if t.AppID != "" {
		appID = t.AppID
	}
	devID := simpleWildcard
	if t.DevID != "" {
		devID = t.DevID
	}
	if t.Type == DeviceEvents && t.Field == "" {
		t.Field = wildcard
	}
	key := fmt.Sprintf("%s.%s.%s.%s", appID, "devices", devID, t.Type)
	if t.Type == DeviceEvents && t.Field != "" {
		key += "." + t.Field
	}
	return key
}
595293
func (v *VersionFile) Read() (*EtcdVersionPair, error) {
	data, err := ioutil.ReadFile(v.path)
	if err != nil {
		return nil, fmt.Errorf("failed to read version file %s: %v", v.path, err)
	}
	txt := strings.TrimSpace(string(data))
	vp, err := ParseEtcdVersionPair(txt)
	if err != nil {
		return nil, fmt.Errorf("failed to parse etcd '<version>/<storage-version>' string from version.txt file contents '%s': %v", txt, err)
	}
	return vp, nil
}
802382
func (v *Version) String() string {
	return fmt.Sprintf("Version: %s%d.%d.%d%s\nBuild Date: %s\n Minimium Go Version: %s",
		v.Prefix, v.Major, v.Minor, v.Maintenance, v.Suffix, v.BuildDate, v.MinGoVersion)
}
1171158
func (v *vsn) String() string {
	vs := fmt.Sprintf("%d.%d.%d", v.major, v.minor, v.patch)
	if len(v.preRelease) > 0 {
		vs += "-" + v.PreRelease()
	}
	if len(v.metadata) > 0 {
		vs += Metadata + v.Metadata()
	}
	return vs
}
1054623
func (c *dependency) String() string {
	s := c.name

	switch {
	case DepFlagLesserOrEqual == (c.flags & DepFlagLesserOrEqual):
		s = fmt.Sprintf("%s <=", s)

	case DepFlagLesser == (c.flags & DepFlagLesser):
		s = fmt.Sprintf("%s <", s)

	case DepFlagGreaterOrEqual == (c.flags & DepFlagGreaterOrEqual):
		s = fmt.Sprintf("%s >=", s)

	case DepFlagGreater == (c.flags & DepFlagGreater):
		s = fmt.Sprintf("%s >", s)

	case DepFlagEqual == (c.flags & DepFlagEqual):
		s = fmt.Sprintf("%s =", s)
	}

	if c.version != "" {
		s = fmt.Sprintf("%s %s", s, c.version)
	}

	if c.release != "" {
		s = fmt.Sprintf("%s.%s", s, c.release)
	}

	return s
}
563707
func (key *pkcs11CtxCacheKey) String() string {
	return fmt.Sprintf("%x_%s_%s_%d_%d", key.lib, key.label, key.opts.connectionName, key.opts.sessionCacheSize, key.opts.openSessionRetry)
}
294548
func (v Variant) String() string {
	s, unamb := v.format()
	if !unamb {
		return "@" + v.sig.str + " " + s
	}
	return s
}
1004938
func (v *storageIdValue) String() string {
	if *v.result == (names.StorageTag{}) {
		return ""
	}
	return v.result.Id()
}
37030
func (c *Client) GetVersion() (string, error) {
	var clusterVersion string

	versions, err := c.GetClusterVersions()
	if err != nil {
		return "", err
	}
	for _, v := range versions {
		if clusterVersion != "" && clusterVersion != v {
			return "", errors.Errorf("etcd cluster contains endpoints with mismatched versions: %v", versions)
		}
		clusterVersion = v
	}
	if clusterVersion == "" {
		return "", errors.New("could not determine cluster etcd version")
	}
	return clusterVersion, nil
}
1206602
func GetVersion(filename string, clnt *etcd.Client) (version string, err error) {
	var qc Config
	qc, err = LoadConfig(filename, clnt, &struct {
		Version string
	}{})
	if err != nil {
		return "", err
	}
	return qc.Version(), nil
}
693551
func (udh *UDH) String() string {
	return udh.IEI.String() + "," + udh.IELength.String() + "," + udh.IEData.String()
}
1011252
func (r *RecoveryExpr) String() string {
	var buf bytes.Buffer

	buf.WriteString(fmt.Sprintf("%s: %T{Expr: %v, RecoverExpr: %v", r.p, r, r.Expr, r.RecoverExpr))
	buf.WriteString(fmt.Sprintf(", Labels: [\n"))
	for _, e := range r.Labels {
		buf.WriteString(fmt.Sprintf("%s,\n", e))
	}
	buf.WriteString("]}")
	return buf.String()
}
139076
func String(key string, def string) string {
	val := os.Getenv(key)
	if val == "" {
		return def
	}
	return val
}