From 79a17552968c21d164db550cae831c0e6b2383d2 Mon Sep 17 00:00:00 2001 From: Steph Date: Thu, 18 Jan 2024 09:21:29 +0100 Subject: [PATCH] pass in address of chaos studio IDs --- resourcemanager/commonids/chaos_studio_capability.go | 8 ++++---- resourcemanager/commonids/chaos_studio_capability_test.go | 2 +- resourcemanager/commonids/chaos_studio_target.go | 8 ++++---- resourcemanager/commonids/chaos_studio_target_test.go | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/resourcemanager/commonids/chaos_studio_capability.go b/resourcemanager/commonids/chaos_studio_capability.go index 145edb2..62110de 100644 --- a/resourcemanager/commonids/chaos_studio_capability.go +++ b/resourcemanager/commonids/chaos_studio_capability.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" ) -var _ resourceids.ResourceId = ChaosStudioCapabilityId{} +var _ resourceids.ResourceId = &ChaosStudioCapabilityId{} // ChaosStudioCapabilityId is a struct representing the Resource ID for an App Service Plan type ChaosStudioCapabilityId struct { @@ -30,7 +30,7 @@ func NewChaosStudioCapabilityID(scope string, targetName string, capabilityName // ParseChaosStudioCapabilityID parses 'input' into a ChaosStudioCapabilityId func ParseChaosStudioCapabilityID(input string) (*ChaosStudioCapabilityId, error) { - parser := resourceids.NewParserFromResourceIdType(ChaosStudioCapabilityId{}) + parser := resourceids.NewParserFromResourceIdType(&ChaosStudioCapabilityId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -47,14 +47,14 @@ func ParseChaosStudioCapabilityID(input string) (*ChaosStudioCapabilityId, error // ParseChaosStudioCapabilityIDInsensitively parses 'input' case-insensitively into a ChaosStudioCapabilityId // note: this method should only be used for API response data and not user input func ParseChaosStudioCapabilityIDInsensitively(input string) (*ChaosStudioCapabilityId, error) { - parser := resourceids.NewParserFromResourceIdType(ChaosStudioCapabilityId{}) + parser := resourceids.NewParserFromResourceIdType(&ChaosStudioCapabilityId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) } id := ChaosStudioCapabilityId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resourcemanager/commonids/chaos_studio_capability_test.go b/resourcemanager/commonids/chaos_studio_capability_test.go index 4b387d9..40da446 100644 --- a/resourcemanager/commonids/chaos_studio_capability_test.go +++ b/resourcemanager/commonids/chaos_studio_capability_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" ) -var _ resourceids.ResourceId = ChaosStudioCapabilityId{} +var _ resourceids.ResourceId = &ChaosStudioCapabilityId{} func TestNewChaosStudioCapabilityId(t *testing.T) { id := NewChaosStudioCapabilityID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "targetName", "capabilityName") diff --git a/resourcemanager/commonids/chaos_studio_target.go b/resourcemanager/commonids/chaos_studio_target.go index b6d09fe..c308b8a 100644 --- a/resourcemanager/commonids/chaos_studio_target.go +++ b/resourcemanager/commonids/chaos_studio_target.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" ) -var _ resourceids.ResourceId = ChaosStudioTargetId{} +var _ resourceids.ResourceId = &ChaosStudioTargetId{} // ChaosStudioTargetId is a struct representing the Resource ID for an App Service Plan type ChaosStudioTargetId struct { @@ -28,7 +28,7 @@ func NewChaosStudioTargetID(scope string, targetName string) ChaosStudioTargetId // ParseChaosStudioTargetID parses 'input' into a ChaosStudioTargetId func ParseChaosStudioTargetID(input string) (*ChaosStudioTargetId, error) { - parser := resourceids.NewParserFromResourceIdType(ChaosStudioTargetId{}) + parser := resourceids.NewParserFromResourceIdType(&ChaosStudioTargetId{}) parsed, err := parser.Parse(input, false) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) @@ -45,14 +45,14 @@ func ParseChaosStudioTargetID(input string) (*ChaosStudioTargetId, error) { // ParseChaosStudioTargetIDInsensitively parses 'input' case-insensitively into a ChaosStudioTargetId // note: this method should only be used for API response data and not user input func ParseChaosStudioTargetIDInsensitively(input string) (*ChaosStudioTargetId, error) { - parser := resourceids.NewParserFromResourceIdType(ChaosStudioTargetId{}) + parser := resourceids.NewParserFromResourceIdType(&ChaosStudioTargetId{}) parsed, err := parser.Parse(input, true) if err != nil { return nil, fmt.Errorf("parsing %q: %+v", input, err) } id := ChaosStudioTargetId{} - if err := id.FromParseResult(*parsed); err != nil { + if err = id.FromParseResult(*parsed); err != nil { return nil, err } diff --git a/resourcemanager/commonids/chaos_studio_target_test.go b/resourcemanager/commonids/chaos_studio_target_test.go index 20f4d9f..a61c8a6 100644 --- a/resourcemanager/commonids/chaos_studio_target_test.go +++ b/resourcemanager/commonids/chaos_studio_target_test.go @@ -9,7 +9,7 @@ import ( "github.com/hashicorp/go-azure-helpers/resourcemanager/resourceids" ) -var _ resourceids.ResourceId = ChaosStudioTargetId{} +var _ resourceids.ResourceId = &ChaosStudioTargetId{} func TestNewChaosStudioTargetId(t *testing.T) { id := NewChaosStudioTargetID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "targetName")