2019-01-31 01:14:18 -06:00
|
|
|
package parser
|
|
|
|
|
2019-02-07 00:36:08 -06:00
|
|
|
type OptionFunc func(*Parser)
|
2019-01-31 01:14:18 -06:00
|
|
|
|
|
|
|
func WithSuppressWarnings() OptionFunc {
|
2019-02-07 00:36:08 -06:00
|
|
|
return func(ps *Parser) {
|
2019-01-31 01:14:18 -06:00
|
|
|
ps.suppressSeverity = WARNING
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func WithSuppressErrors() OptionFunc {
|
2019-02-07 00:36:08 -06:00
|
|
|
return func(ps *Parser) {
|
2019-01-31 01:14:18 -06:00
|
|
|
ps.suppressSeverity = ERROR
|
|
|
|
}
|
|
|
|
}
|