// String is a string representation of the notification suitable for printing
498209
func (s *StateNotification) String() string {
	return fmt.Sprintf("%s %s#%s command: %s, previous: %s ran: %.3fs", s.Identity, s.Machine, s.Name, s.Command, s.PreviousOutcome, float64(s.PreviousRunTime)/1000000000)
}
316769
func (msg *PssMsg) String() string {
	return fmt.Sprintf("PssMsg: Recipient: %x", common.ToHex(msg.To))
}
895120
func (r *Reply) String() string {
	switch r.Type {
	case ErrorReply:
		return r.Err.Error()
	case StatusReply:
		fallthrough
	case BulkReply:
		return string(r.buf)
	case IntegerReply:
		return strconv.FormatInt(r.int, 10)
	case NilReply:
		return "<nil>"
	case MultiReply:
		s := "[ "
		for _, e := range r.Elems {
			s = s + e.String() + " "
		}
		return s + "]"
	}

	// This should never execute
	return ""
}
1255678
func (u infoMessage) String() (msg string) {
	defer func() {
		msg += "\n"
	}()

	dot := "●"

	// When service is offline
	if u.Service == "off" {
		msg += fmt.Sprintf("%s  %s\n", dot, console.Colorize("PrintB", u.Addr))
		msg += fmt.Sprintf("  Status : %s", console.Colorize("InfoFail", "offline"))
		return
	}

	// Print error if any and exit
	if u.Err != "" {
		msg += fmt.Sprintf("%s  %s\n", dot, console.Colorize("PrintB", u.Addr))
		msg += fmt.Sprintf("   Status : %s\n", console.Colorize("InfoFail", "offline"))
		e := u.Err
		if strings.Trim(e, " ") == "rpc: retry error" {
			e = "unreachable"
		}
		msg += fmt.Sprintf("    Error : %s", console.Colorize("InfoFail", e))
		return
	}

	// Print server title
	msg += fmt.Sprintf("%s  %s\n", dot, console.Colorize("PrintB", u.Addr))

	// Status
	msg += fmt.Sprintf("   Status : %s\n", console.Colorize("Info", "online"))

	// Uptime
	msg += fmt.Sprintf("   Uptime : %s\n", humanize.RelTime(time.Now(), time.Now().Add(-u.ServerInfo.Properties.Uptime), "", ""))
	// Version
	version := u.ServerInfo.Properties.Version
	if u.ServerInfo.Properties.Version == "DEVELOPMENT.GOGET" {
		version = "<development>"
	}
	msg += fmt.Sprintf("  Version : %s\n", version)
	// Region
	if u.ServerInfo.Properties.Region != "" {
		msg += fmt.Sprintf("   Region : %s\n", u.ServerInfo.Properties.Region)
	}
	// ARNs
	sqsARNs := ""
	for _, v := range u.ServerInfo.Properties.SQSARN {
		sqsARNs += fmt.Sprintf("%s ", v)
	}
	if sqsARNs != "" {
		msg += fmt.Sprintf(" SQS ARNs : %s\n", sqsARNs)
	}

	// Incoming/outgoing
	msg += fmt.Sprintf("  Storage : Used %s", humanize.IBytes(u.StorageInfo.Used))
	if v, ok := u.ServerInfo.StorageInfo.Backend.(xlBackend); ok {
		upBackends := 0
		downBackends := 0
		for _, s := range v.Sets {
			for _, s := range s {
				if strings.Contains(s.Endpoint, u.Addr) {
					if s.State == "ok" {
						upBackends++
					} else {
						downBackends++
					}
				}
			}
		}
		upBackendsString := fmt.Sprintf("%d", upBackends)
		if downBackends != 0 {
			upBackendsString = console.Colorize("InfoFail", fmt.Sprintf("%d", upBackends))
		}
		msg += fmt.Sprintf("\n   Drives : %s/%d OK\n", upBackendsString, upBackends+downBackends)
	}
	return
}
341531
func (ds *DestSme) String() string {
	return ds.Flag.String() + "," + ds.Ton.String() + "," + ds.Npi.String() + "," + ds.DestAddr.String()
}
1152328
func (t Type) String() string {
	return fmt.Sprintf("Type{%v %q %T %v}", t.Kind, t.Pkg, t.Node, pretty{t.Node})
}
791291
func (s *stringSet) String() string {
	all := s.All()
	return fmt.Sprintf("%v", all)
}
381918
func (r *result) String() string {
	buf := &bytes.Buffer{}

	fmt.Fprintln(buf, "=== RUN", r.name)
	if r.passed {
		fmt.Fprintf(buf, "--- PASS: %s (%s)", r.name, r.duration)
	} else {
		// fmt.Fprintln(buf, "    CMD:", r.cmd)
		fmt.Fprintf(buf, strings.Join(r.output, "\n"))
		fmt.Fprintf(buf, "--- FAIL: %s (%s)", r.name, r.duration)
	}

	return buf.String()
}
638380
func (t *ThrowExpr) String() string {
	return fmt.Sprintf("%s: %T{Label: %v}", t.p, t, t.Label)
}
636549
func (r rmMessage) String() string {
	return console.Colorize("Remove", fmt.Sprintf("Removing `%s`.", r.Key))
}
1168195
func (v *Echo_Echo_Result) String() string {
	if v == nil {
		return "<nil>"
	}

	var fields [1]string
	i := 0
	if v.Success != nil {
		fields[i] = fmt.Sprintf("Success: %v", v.Success)
		i++
	}

	return fmt.Sprintf("Echo_Echo_Result{%v}", strings.Join(fields[:i], ", "))
}
509866
func (e Entry) String() string {
	return fmt.Sprintf("line %d: %s: %s", e.line, e.kind, e.message)
}
282334
func (s *StateNotification) String() string {
	return fmt.Sprintf("%s %s#%s path: %s, previous: %s", s.Identity, s.Machine, s.Name, s.Path, s.PreviousOutcome)
}
607531
func (this Slice) String() string {
	wr := bytes.NewBuffer(nil)
	fmt.Fprint(wr, "Slice[")
	for i, v := range this {
		fmt.Fprintf(wr, "%v: %v", v.Key, print(v.Val))
		if i != len(this)-1 {
			fmt.Fprint(wr, " ")
		}
	}
	fmt.Fprintf(wr, "]")
	return wr.String()
}
12337
func (r report) String() string {
	result := &bytes.Buffer{}
	fmt.Fprintf(result, "{")
	for k := range r {
		var status string
		switch k {
		case statusPending:
			status = "pending"
		case statusDownloading:
			status = "downloading"
		case statusExtracting:
			status = "extracting"
		case statusComplete:
			status = "complete"
		}
		fmt.Fprintf(result, "%s:{Count: %d, Current: %d, Total: %d}, ", status, r[k].Count, r[k].Current, r[k].Total)
	}
	fmt.Fprintf(result, "}")
	return result.String()
}
893241
func (r *Rule) String() string {
	return fmt.Sprintf("%s: %T{Name: %v, DisplayName: %v, Expr: %v}",
		r.p, r, r.Name, r.DisplayName, r.Expr)
}
484353
func (email Email) String() string {
	// TODO Prevent email lines from being over 78 characters?
	b := new(bytes.Buffer)

	// TODO The following error is ignored
	emailTemplate.Execute(b, email)
	return b.String()
}