diff options
Diffstat (limited to 'singleton_ctx.go')
-rw-r--r-- | singleton_ctx.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/singleton_ctx.go b/singleton_ctx.go index 176aa25..e600cfd 100644 --- a/singleton_ctx.go +++ b/singleton_ctx.go @@ -52,10 +52,7 @@ type SingletonContext interface { // return value can always be type-asserted to the type of the provider. The return value should // always be considered read-only. It panics if called before the appropriate mutator or // GenerateBuildActions pass for the provider on the module. - ModuleProvider(module Module, provider ProviderKey) interface{} - - // ModuleHasProvider returns true if the provider for the given module has been set. - ModuleHasProvider(m Module, provider ProviderKey) bool + ModuleProvider(module Module, provider AnyProviderKey) (any, bool) // ModuleErrorf reports an error at the line number of the module type in the module definition. ModuleErrorf(module Module, format string, args ...interface{}) @@ -202,15 +199,10 @@ func (s *singletonContext) ModuleType(logicModule Module) string { return s.context.ModuleType(logicModule) } -func (s *singletonContext) ModuleProvider(logicModule Module, provider ProviderKey) interface{} { +func (s *singletonContext) ModuleProvider(logicModule Module, provider AnyProviderKey) (any, bool) { return s.context.ModuleProvider(logicModule, provider) } -// ModuleHasProvider returns true if the provider for the given module has been set. -func (s *singletonContext) ModuleHasProvider(logicModule Module, provider ProviderKey) bool { - return s.context.ModuleHasProvider(logicModule, provider) -} - func (s *singletonContext) BlueprintFile(logicModule Module) string { return s.context.BlueprintFile(logicModule) } |