NewExtractor creates a new extractor matching the source file name
(source string)
| 63 | |
| 64 | // NewExtractor creates a new extractor matching the source file name |
| 65 | func NewExtractor(source string) (Extractor, error) { |
| 66 | for suffix, extractor := range Extractors { |
| 67 | if strings.HasSuffix(source, suffix) { |
| 68 | return extractor, nil |
| 69 | } |
| 70 | } |
| 71 | return nil, fmt.Errorf("no extractor implemented yet for %s", source) |
| 72 | } |
| 73 | |
| 74 | // cleanJoin resolves dest as a subpath of root. |
| 75 | // |
no outgoing calls
searching dependent graphs…