yay/pkg/settings/parser/target_mode.go

18 lines
273 B
Go
Raw Normal View History

package parser
type TargetMode int
const (
ModeAny TargetMode = iota
ModeAUR
ModeRepo
)
2021-08-09 13:26:32 +02:00
func (mode TargetMode) AtLeastAUR() bool {
return mode == ModeAny || mode == ModeAUR
}
func (mode TargetMode) AtLeastRepo() bool {
return mode == ModeAny || mode == ModeRepo
}