16 lines
266 B
Go
16 lines
266 B
Go
|
package parser
|
||
|
|
||
|
type OptionFunc func(*parseState)
|
||
|
|
||
|
func WithSuppressWarnings() OptionFunc {
|
||
|
return func(ps *parseState) {
|
||
|
ps.suppressSeverity = WARNING
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func WithSuppressErrors() OptionFunc {
|
||
|
return func(ps *parseState) {
|
||
|
ps.suppressSeverity = ERROR
|
||
|
}
|
||
|
}
|