Add type-safe artifact lane resolution
This commit is contained in:
@@ -31,7 +31,7 @@ var referenceSlotDescriptions = shared.ReferenceSlotDescriptions{
|
||||
Roster: "Deprecated alias for party roster reference material used only for disambiguation.",
|
||||
}
|
||||
|
||||
var _ contracts.Extractor = (*Extractor)(nil)
|
||||
var _ contracts.LegacyRawExtractor = (*Extractor)(nil)
|
||||
|
||||
type Extractor struct{}
|
||||
|
||||
@@ -164,7 +164,7 @@ func ModuleSpec() pipeline.ModuleSpec {
|
||||
}
|
||||
|
||||
func Register(registry *pipeline.ExtractorRegistry) error {
|
||||
return registry.RegisterWithSpec(ModuleSpec(), func() (contracts.Extractor, error) {
|
||||
return registry.RegisterLegacyRawWithSpec(ModuleSpec(), func() (contracts.LegacyRawExtractor, error) {
|
||||
return New(), nil
|
||||
})
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ func TestRegisterMakesExtractorBuildable(t *testing.T) {
|
||||
t.Fatalf("Register() error = %v, want nil", err)
|
||||
}
|
||||
|
||||
extractor, err := registry.Build(Key)
|
||||
extractor, err := registry.BuildLegacyRaw(Key)
|
||||
if err != nil {
|
||||
t.Fatalf("Build() error = %v, want nil", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user