diff --git a/internal/builder/config.go b/internal/builder/config.go index fa253e8..a0f547f 100644 --- a/internal/builder/config.go +++ b/internal/builder/config.go @@ -64,7 +64,6 @@ type Module struct { Import string `mapstructure:"import"` // if not specified, this is the path part of the go mods GoMod string `mapstructure:"gomod"` // a gomod-compatible spec for the module Path string `mapstructure:"path"` // an optional path to the local version of this module - Core bool `mapstructure:"core"` // whether this module comes from core, meaning that no further dependencies will be added } // DefaultConfig creates a new config, with default values @@ -134,7 +133,7 @@ func (c *Config) ParseModules() error { func parseModules(mods []Module) ([]Module, error) { var parsedModules []Module for _, mod := range mods { - if mod.GoMod == "" && !mod.Core { + if mod.GoMod == "" { return mods, fmt.Errorf("%w, module: %q", ErrInvalidGoMod, mod.GoMod) } diff --git a/internal/builder/config_test.go b/internal/builder/config_test.go index 08fab22..59e99cb 100644 --- a/internal/builder/config_test.go +++ b/internal/builder/config_test.go @@ -65,9 +65,9 @@ func TestRelativePath(t *testing.T) { func TestModuleFromCore(t *testing.T) { // prepare cfg := Config{ - Extensions: []Module{{ - Core: true, + Extensions: []Module{{ // see issue-12 Import: "go.opentelemetry.io/collector/receiver/jaegerreceiver", + GoMod: "go.opentelemetry.io/collector v0.21.0", }}, } @@ -77,7 +77,6 @@ func TestModuleFromCore(t *testing.T) { // verify assert.True(t, strings.HasPrefix(cfg.Extensions[0].Name, "jaegerreceiver")) - assert.Empty(t, cfg.Extensions[0].GoMod) } func TestInvalidModule(t *testing.T) {