From 97dea539bfef2fe3319988139c8d33be8e1a2cfd Mon Sep 17 00:00:00 2001 From: Costas Papastathis Date: Thu, 4 May 2023 15:39:04 +0300 Subject: [PATCH] adding hasStack method for ConfigExtension --- cargo/extension_config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cargo/extension_config.go b/cargo/extension_config.go index 67cfe826..c7e9d595 100644 --- a/cargo/extension_config.go +++ b/cargo/extension_config.go @@ -86,3 +86,13 @@ func DecodeExtensionConfig(reader io.Reader, extensionConfig *ExtensionConfig) e return json.Unmarshal(content, extensionConfig) } + +func (cd ConfigExtensionMetadataDependency) HasStack(stack string) bool { + for _, s := range cd.Stacks { + if s == stack { + return true + } + } + + return false +}