Skip to content

Commit

Permalink
Merge pull request #197 from hashicorp/b/sql-database-id
Browse files Browse the repository at this point in the history
sql_database: updating the `Parse` method name
  • Loading branch information
tombuildsstuff authored Nov 23, 2023
2 parents 6f888f2 + 7d0f91d commit 7b2ae06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions resourcemanager/commonids/sql_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
}

Expand Down
3 changes: 1 addition & 2 deletions resourcemanager/commonids/sql_database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}

}
}

Expand Down

0 comments on commit 7b2ae06

Please sign in to comment.