package cli import "fmt" // sourceNote is what to print about a checked source. // // It says where the answer came from, because the control plane's network is // not the nodes' network: a mirror this machine can reach may be unreachable // from a node behind a different firewall, and the reverse. The check catches // typos and a mirror that is down, which is most of what goes wrong, and it // should not be read as proof that the fetch will work. func sourceNote(source string, size int64) string { if size > 0 { return fmt.Sprintf(" source reachable from here: %s (%s)", source, fileSize(size)) } return fmt.Sprintf(" source reachable from here: %s (size not advertised)", source) }