Skip to content

Commit

Permalink
Add reset keyword to reset exludes
Browse files Browse the repository at this point in the history
  • Loading branch information
wilriker committed Jul 29, 2019
1 parent 4604a6c commit e33fc4f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions excludes.go
Expand Up @@ -2,6 +2,10 @@ package rfm

import "strings"

const (
resetKeyword = "reset"
)

/// Excludes contains simple starts-with patterns for upload/download excludes
type Excludes struct {
Excls []string
Expand All @@ -12,6 +16,9 @@ func (e *Excludes) String() string {
}

func (e *Excludes) Set(value string) error {
if value == resetKeyword {
e.Excls = make([]string, 0)
}
e.Excls = append(e.Excls, value)
return nil
}
Expand Down

0 comments on commit e33fc4f

Please sign in to comment.