MCPcopy
hub / github.com/google/go-cmp / verbosityPreset

Function verbosityPreset

cmp/report_compare.go:84–94  ·  view source on GitHub ↗

verbosityPreset modifies the verbosity settings given an index between 0 and maxVerbosityPreset, inclusive.

(opts formatOptions, i int)

Source from the content-addressed store, hash-verified

82// verbosityPreset modifies the verbosity settings given an index
83// between 0 and maxVerbosityPreset, inclusive.
84func verbosityPreset(opts formatOptions, i int) formatOptions {
85 opts.VerbosityLevel = int(opts.verbosity()) + 2*i
86 if i > 0 {
87 opts.AvoidStringer = true
88 }
89 if i >= maxVerbosityPreset {
90 opts.PrintAddresses = true
91 opts.QualifiedNames = true
92 }
93 return opts
94}
95
96// FormatDiff converts a valueNode tree into a textNode tree, where the later
97// is a textual representation of the differences detected in the former.

Callers 2

FormatDiffMethod · 0.85
formatDiffListMethod · 0.85

Calls 1

verbosityMethod · 0.80

Tested by

no test coverage detected