// printMarkerSuggestions prints a formatted list of marker suggestions
// and returns the amount of suggestions printed
960574
func printMarkerSuggestions(markers []osgraph.Marker, suggest bool, out *tabwriter.Writer, indent string) int {
	suggestionAmount := 0
	for _, marker := range markers {
		if len(marker.Suggestion) > 0 {
			suggestionAmount++
		}
		if len(marker.Message) > 0 && (suggest || marker.Severity == osgraph.ErrorSeverity) {
			fmt.Fprintln(out, indent+"* "+marker.Message)
		}
		if len(marker.Suggestion) > 0 && suggest {
			switch s := marker.Suggestion.String(); {
			case strings.Contains(s, "\n"):
				fmt.Fprintln(out)
				for _, line := range strings.Split(s, "\n") {
					fmt.Fprintln(out, indent+"  "+line)
				}
			case len(s) > 0:
				fmt.Fprintln(out, indent+"  try: "+s)
			}
		}
	}
	return suggestionAmount
}
167329
func PrintOrigins(print bool) {
	if print {
		atomic.StoreUint32(&locationEnabled, 1)
	} else {
		atomic.StoreUint32(&locationEnabled, 0)
	}
}
50123
func printLocks(locks madmin.LockEntries) {
	if !globalJSON {
		printHeaders()
	}
	for _, entry := range locks {
		printMsg(lockMessage{Lock: entry})
	}
}
664773
func (ref *Consumer) PrintNotification(note map[string][]int32) {
	for k, v := range note {
		fmt.Printf("  Topic: %s\n", k)
		fmt.Printf("    Partitions: %v\n", v)
	}
}
798817
func (s *ListBootstrapActionsInput) SetMarker(v string) *ListBootstrapActionsInput {
	s.Marker = &v
	return s
}
164268
func (bto *BootstrapTokenOptions) AddUsagesFlag(fs *pflag.FlagSet) {
	fs.StringSliceVar(
		&bto.Usages, TokenUsages, bto.Usages,
		fmt.Sprintf("Describes the ways in which this token can be used. You can pass --usages multiple times or provide a comma separated list of options. Valid options: [%s]", strings.Join(kubeadmconstants.DefaultTokenUsages, ",")),
	)
}
209864
func printHosts(hosts ...hostMessage) {
	var maxAlias = 0
	for _, host := range hosts {
		if len(host.Alias) > maxAlias {
			maxAlias = len(host.Alias)
		}
	}
	for _, host := range hosts {
		if !globalJSON {
			// Format properly for alignment based on alias length only in non json mode.
			host.Alias = fmt.Sprintf("%-*.*s", maxAlias, maxAlias, host.Alias)
		}
		if host.AccessKey == "" || host.SecretKey == "" {
			host.AccessKey = ""
			host.SecretKey = ""
			host.API = ""
		}
		printMsg(host)
	}
}
231505
func (s *ListFileSharesInput) SetMarker(v string) *ListFileSharesInput {
	s.Marker = &v
	return s
}
436980
func printDocumentIds(documentPointers []*CouchDoc) (string, error) {

	documentIds := []string{}

	for _, documentPointer := range documentPointers {
		docMetadata := &DocMetadata{}
		err := json.Unmarshal(documentPointer.JSONValue, &docMetadata)
		if err != nil {
			return "", errors.Wrap(err, "error unmarshalling json data")
		}
		documentIds = append(documentIds, docMetadata.ID)
	}
	return strings.Join(documentIds, ","), nil
}
1045365
func MapToResourceTags(tagMap map[string]string) []interface{} {
	tags := make([]interface{}, len(tagMap))
	tagsIndex := 0
	for eachKey, eachValue := range tagMap {
		tags[tagsIndex] = map[string]interface{}{
			"Key":   eachKey,
			"Value": eachValue,
		}
		tagsIndex++
	}
	return tags
}
1122381
func (s *StringCodeGenerator) ToolChangeSuggestion(t int) {
	if s.Tool != t {
		s.put(fmt.Sprintf("T%d", t))
		s.Tool = t
		s.ForceModeWrite = true
	}
}
625101
func ClusterPointers(pointers []geo.Pointer, distancer ClusterDistancer, threshold float64) []*Cluster {
	clusters := make([]*Cluster, 0, len(pointers))
	for _, p := range pointers {
		clusters = append(clusters, NewCluster(p))
	}

	return cluster(clusters, distancer, threshold)
}
114283
func (f *Flags) PrintHelp() {
	fmt.Fprintf(f.writer, "Usage of %s:\n", f.appName)
	fmt.Fprintf(f.writer, "%s\n", helpMessage)
	fmt.Fprintf(f.writer, "FLAGS\n")
	f.flagSet.PrintDefaults()
}
497313
func Marker(mark, msg string, v ...interface{}) string {
	return fmt.Sprintf("%s %s\n", mark, fmt.Sprintf(msg, v...))
}
767681
func queryMarkedTags(job mapper.JobID) *datastore.Query {
	return datastore.NewQuery("mapper.MarkedTag").Eq("Job", job)
}
940576
func (s *GetDomainSuggestionsOutput) SetSuggestionsList(v []*DomainSuggestion) *GetDomainSuggestionsOutput {
	s.SuggestionsList = v
	return s
}
164784
func printPointSummary(ctx context.Context, store *cassandra.CassandraStore, tables []cassandra.Table, metrics []Metric, fromUnix, toUnix, fix uint32) {
	for _, metric := range metrics {
		fmt.Println("## Metric", metric)
		for _, table := range tables {
			fmt.Println("### Table", table.Name)
			if fix != 0 {
				points := getSeries(ctx, store, table, metric.AMKey, fromUnix, toUnix, fix)
				printPointsSummary(points, fromUnix, toUnix)
			} else {
				igens, err := store.SearchTable(ctx, metric.AMKey, table, fromUnix, toUnix)
				if err != nil {
					panic(err)
				}
				printSummary(igens, fromUnix, toUnix)
			}
		}
	}
}