(inlineArgs []string, cfg *config.Map)
| 46 | } |
| 47 | |
| 48 | func (s *EmailWithDomain) Configure(inlineArgs []string, cfg *config.Map) error { |
| 49 | s.domains = inlineArgs |
| 50 | |
| 51 | for _, d := range s.domains { |
| 52 | if !address.ValidDomain(d) { |
| 53 | return fmt.Errorf("%s: invalid domain: %s", s.modName, d) |
| 54 | } |
| 55 | } |
| 56 | if len(s.domains) == 0 { |
| 57 | return fmt.Errorf("%s: at least one domain is required", s.modName) |
| 58 | } |
| 59 | |
| 60 | return nil |
| 61 | } |
| 62 | |
| 63 | func (s *EmailWithDomain) Name() string { |
| 64 | return s.modName |
nothing calls this directly
no test coverage detected