MCPcopy Create free account
hub / github.com/bracesdev/errtrace / shouldFormat

Method shouldFormat

cmd/errtrace/main.go:76–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74}
75
76func (p *mainParams) shouldFormat() bool {
77 switch p.Format {
78 case formatAuto:
79 return p.Write
80 case formatAlways:
81 return true
82 case formatNever:
83 return false
84 default:
85 panic(fmt.Sprintf("unknown format %q", p.Format))
86 }
87}
88
89func (p *mainParams) Parse(w io.Writer, args []string) error {
90 flag := flag.NewFlagSet("errtrace", flag.ContinueOnError)

Callers 2

RunMethod · 0.95
TestShouldFormatFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestShouldFormatFunction · 0.64