Validate validates the fields and sets the default values.
(r *Repository)
| 510 | |
| 511 | // Validate validates the fields and sets the default values. |
| 512 | func (o *AddOptions) Validate(r *Repository) error { |
| 513 | if o.Path != "" && o.Glob != "" { |
| 514 | return fmt.Errorf("fields Path and Glob are mutual exclusive") |
| 515 | } |
| 516 | |
| 517 | return nil |
| 518 | } |
| 519 | |
| 520 | // CommitOptions describes how a commit operation should be performed. |
| 521 | type CommitOptions struct { |