()
| 74 | } |
| 75 | |
| 76 | func (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 | |
| 89 | func (p *mainParams) Parse(w io.Writer, args []string) error { |
| 90 | flag := flag.NewFlagSet("errtrace", flag.ContinueOnError) |
no outgoing calls