goldsmith/filters/condition/condition.go

22 lines
315 B
Go
Raw Normal View History

2024-02-17 06:35:49 +00:00
package condition
import (
"git.foosoft.net/alex/goldsmith"
)
type Condition struct {
accept bool
}
func New(accept bool) *Condition {
return &Condition{accept: accept}
}
func (*Condition) Name() string {
return "condition"
}
2024-02-20 00:26:41 +00:00
func (self *Condition) Accept(file goldsmith.File) bool {
2024-02-17 06:35:49 +00:00
return self.accept
}