()
| 225 | } |
| 226 | |
| 227 | func (f *File) check() error { |
| 228 | cnt := 0 |
| 229 | if f.Data != nil { |
| 230 | cnt++ |
| 231 | } |
| 232 | if f.Source != "" { |
| 233 | cnt++ |
| 234 | } |
| 235 | if cnt > 1 { |
| 236 | return fmt.Errorf("%s: must specify at most one of data or source", f.Name) |
| 237 | } |
| 238 | return nil |
| 239 | } |
| 240 | |
| 241 | func (f *File) load(dir string) ([]byte, *regexp.Regexp, error) { |
| 242 | if f.Data != nil { |