From 7d0f91dd63f4dd8fe1e1e4f702813aa8cea588ac Mon Sep 17 00:00:00 2001 From: tombuildsstuff Date: Thu, 23 Nov 2023 15:43:06 +0100 Subject: [PATCH] sql_database: updating the `Parse` method name --- resourcemanager/commonids/sql_database.go | 6 +++--- resourcemanager/commonids/sql_database_test.go | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/resourcemanager/commonids/sql_database.go b/resourcemanager/commonids/sql_database.go index 8be362d..f8ea32c 100644 --- a/resourcemanager/commonids/sql_database.go +++ b/resourcemanager/commonids/sql_database.go @@ -30,8 +30,8 @@ func NewSqlDatabaseID(subscriptionId string, resourceGroupName string, serverNam } } -// ParseDatabaseID parses 'input' into a SqlDatabaseId -func ParseDatabaseID(input string) (*SqlDatabaseId, error) { +// ParseSqlDatabaseID parses 'input' into a SqlDatabaseId +func ParseSqlDatabaseID(input string) (*SqlDatabaseId, error) { parser := resourceids.NewParserFromResourceIdType(SqlDatabaseId{}) parsed, err := parser.Parse(input, false) if err != nil { @@ -99,7 +99,7 @@ func ValidateSqlDatabaseID(input interface{}, key string) (warnings []string, er return } - if _, err := ParseDatabaseID(v); err != nil { + if _, err := ParseSqlDatabaseID(v); err != nil { errors = append(errors, err) } diff --git a/resourcemanager/commonids/sql_database_test.go b/resourcemanager/commonids/sql_database_test.go index 3e9a3c5..d25bd19 100644 --- a/resourcemanager/commonids/sql_database_test.go +++ b/resourcemanager/commonids/sql_database_test.go @@ -114,7 +114,7 @@ func TestParseSqlDatabaseID(t *testing.T) { for _, v := range testData { t.Logf("[DEBUG] Testing %q", v.Input) - actual, err := ParseDatabaseID(v.Input) + actual, err := ParseSqlDatabaseID(v.Input) if err != nil { if v.Error { continue @@ -307,7 +307,6 @@ func TestParseSqlDatabaseIDInsensitively(t *testing.T) { if actual.DatabaseName != v.Expected.DatabaseName { t.Fatalf("Expected %q but got %q for DatabaseName", v.Expected.DatabaseName, actual.DatabaseName) } - } }