From df031db9daa3d9527a48fe3097d2d6003cb2ba57 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Mon, 2 Dec 2019 09:09:42 -0800 Subject: [PATCH] builder/azure/common/template: remove unused TemplateBuilder.getResourceByType2() (#8419) builder/azure/common/template: remove unused TemplateBuilder.toKeyVaultID() --- builder/azure/common/template/template_builder.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/builder/azure/common/template/template_builder.go b/builder/azure/common/template/template_builder.go index 1e1eb53d4..9f74c20b0 100644 --- a/builder/azure/common/template/template_builder.go +++ b/builder/azure/common/template/template_builder.go @@ -375,25 +375,10 @@ func (s *TemplateBuilder) getResourceByType(t string) (*Resource, error) { return nil, fmt.Errorf("template: could not find a resource of type %s", t) } -func (s *TemplateBuilder) getResourceByType2(t string) (**Resource, error) { - for _, x := range *s.template.Resources { - if strings.EqualFold(*x.Type, t) { - p := &x - return &p, nil - } - } - - return nil, fmt.Errorf("template: could not find a resource of type %s", t) -} - func (s *TemplateBuilder) setVariable(name string, value string) { (*s.template.Variables)[name] = value } -func (s *TemplateBuilder) toKeyVaultID(name string) string { - return s.toResourceID(resourceKeyVaults, name) -} - func (s *TemplateBuilder) toResourceID(id, name string) string { return fmt.Sprintf("[resourceId(resourceGroup().name, '%s', '%s')]", id, name) }