// DefaultDescribeFormatOptions returns default options for formatting
// the output.
635
func DefaultDescribeFormatOptions() (DescribeFormatOptions, error) {
	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	opts := C.git_describe_format_options{}
	ecode := C.git_describe_init_format_options(&opts, C.GIT_DESCRIBE_FORMAT_OPTIONS_VERSION)
	if ecode < 0 {
		return DescribeFormatOptions{}, MakeGitError(ecode)
	}

	return DescribeFormatOptions{
		AbbreviatedSize:     uint(opts.abbreviated_size),
		AlwaysUseLongFormat: opts.always_use_long_format == 1,
	}, nil
}
582914
func defaultFormatter(val float64, precision int) string {
	return strconv.FormatFloat(val, 'f', precision, 64)
}
486741
func (s *GetDocumentInput) SetDocumentFormat(v string) *GetDocumentInput {
	s.DocumentFormat = &v
	return s
}
538877
func (c *NoteCollection) DefaultRef() (string, error) {
	buf := C.git_buf{}

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	ecode := C.git_note_default_ref(&buf, c.repo.ptr)
	runtime.KeepAlive(c)
	if ecode < 0 {
		return "", MakeGitError(ecode)
	}

	ret := C.GoString(buf.ptr)
	C.git_buf_dispose(&buf)

	return ret, nil
}
530204
func OptionAddASCIICodeBind(b ...ASCIICodeBind) Option {
	return func(p *Prompt) error {
		p.ASCIICodeBindings = append(p.ASCIICodeBindings, b...)
		return nil
	}
}
79633
func initFormatXL(ctx context.Context, storageDisks []StorageAPI, setCount, disksPerSet int) (format *formatXLV3, err error) {
	format = newFormatXLV3(setCount, disksPerSet)
	formats := make([]*formatXLV3, len(storageDisks))

	for i := 0; i < setCount; i++ {
		for j := 0; j < disksPerSet; j++ {
			newFormat := *format
			newFormat.XL.This = format.XL.Sets[i][j]
			formats[i*disksPerSet+j] = &newFormat
		}
	}

	// Initialize meta volume, if volume already exists ignores it.
	if err = initFormatXLMetaVolume(storageDisks, formats); err != nil {
		return format, fmt.Errorf("Unable to initialize '.minio.sys' meta volume, %s", err)
	}

	// Save formats `format.json` across all disks.
	if err = saveFormatXLAll(ctx, storageDisks, formats); err != nil {
		return nil, err
	}

	return format, nil
}
809224
func MakeDefaultFormatter() MessageFormatter {
	return func(m message.Composer) (string, error) {
		return fmt.Sprintf(defaultFormatTmpl, m.Priority(), m.String()), nil
	}
}
291876
func NewDiffFormat(source string) formatter.Format {
	switch source {
	case formatter.TableFormatKey:
		return defaultDiffTableFormat
	}
	return formatter.Format(source)
}
1054727
func (email *Email) SetFormatFunc(fn FormatFunc) {
	email.rw.Lock()
	defer email.rw.Unlock()

	email.formatFunc = fn
}
263789
func (s *DocumentIdentifier) SetDocumentFormat(v string) *DocumentIdentifier {
	s.DocumentFormat = &v
	return s
}
49463
func GetDefaultEPOptsStringWithPrefix(prefix string) string {
	strs := make([]string, 0, len(registeredWorkloads))
	crs := make([]string, 0, len(registeredWorkloads))

	for k := range registeredWorkloads {
		crs = append(crs, string(k))
	}
	sort.Strings(crs)

	for _, cr := range crs {
		v := registeredWorkloads[WorkloadRuntimeType(cr)].getConfig()
		strs = append(strs, fmt.Sprintf("%s%s=%s", prefix, cr, v[EpOpt]))
	}

	return strings.Join(strs, ", ")
}
1148563
func setDefaults() {
	formats = defaultFormats()
	tests = defaultTests()
	codecs = defaultCodecs()
	paths = defaultPaths()
	globs = []string{"*.txt", "*.bin"}
	levels = []int{1, 6, 9}
	sizes = []int{1e4, 1e5, 1e6}
}
728576
func (f *FlattenCmdOptions) SetFlattenOptions(dflt *analysis.FlattenOpts) (res *analysis.FlattenOpts) {
	res = &analysis.FlattenOpts{}
	if dflt != nil {
		*res = *dflt
	}
	if f == nil {
		return
	}
	verboseIsSet := false
	minimalIsSet := false
	//removeUnusedIsSet := false
	expandIsSet := false
	if f.WithExpand {
		res.Expand = true
		expandIsSet = true
	}
	for _, opt := range f.WithFlatten {
		if opt == "verbose" {
			res.Verbose = true
			verboseIsSet = true
		}
		if opt == "noverbose" && !verboseIsSet {
			// verbose flag takes precedence
			res.Verbose = false
			verboseIsSet = true
		}
		if opt == "remove-unused" {
			res.RemoveUnused = true
			//removeUnusedIsSet = true
		}
		if opt == "expand" {
			res.Expand = true
			expandIsSet = true
		}
		if opt == "full" && !minimalIsSet && !expandIsSet {
			// minimal flag takes precedence
			res.Minimal = false
			minimalIsSet = true
		}
		if opt == "minimal" && !expandIsSet {
			// expand flag takes precedence
			res.Minimal = true
			minimalIsSet = true
		}
	}
	return
}
226778
func (s *DocumentDescription) SetDocumentFormat(v string) *DocumentDescription {
	s.DocumentFormat = &v
	return s
}
1203935
func NewDefaultReconcileSCCOptions(streams genericclioptions.IOStreams) *ReconcileSCCOptions {
	return &ReconcileSCCOptions{
		PrintFlags: genericclioptions.NewPrintFlags("").WithTypeSetter(scheme.Scheme).WithDefaultOutput("yaml"),

		Union:          true,
		InfraNamespace: bootstrappolicy.DefaultOpenShiftInfraNamespace,
		IOStreams:      streams,
	}
}
82600
func (cfg Config) FormatReference(t time.Time, reference time.Time) string {

	d := reference.Sub(t)

	if (d >= 0 && d >= cfg.Max) || (d < 0 && -d >= cfg.Max) {
		return t.Format(cfg.DefaultLayout)
	}

	return cfg.FormatRelativeDuration(d)
}
937847
func formatCommitDesc(desc string) template.HTML {
	chunks := []formatChunk{{str: desc}}
	// Replace BUG: lines with URLs by rewriting all bug numbers with
	// links. Run this first so later rules do not interfere with it. This
	// allows a line like the following to work:
	//
	// Bug: https://crbug.com/1234, 5678
	chunks = replaceAllInChunks(chunks, rBUGLINE, func(s string) template.HTML {
		sChunks := []formatChunk{{str: s}}
		// The call later in the parent function will not reach into
		// sChunks, so run it separately.
		sChunks = replaceLinkChunks(sChunks)
		sChunks = replaceAllInChunks(sChunks, rBUG, func(sBug string) template.HTML {
			path := strings.Replace(strings.Replace(sBug, "#", "", 1), ":", "/", 1)
			return makeLink(sBug, "https://crbug.com/"+path)
		})
		return chunksToHTML(sChunks)
	})
	chunks = replaceLinkChunks(chunks)
	return chunksToHTML(chunks)
}