Skip to content

Commit

Permalink
Resolved Go Linte Issues
Browse files Browse the repository at this point in the history
  • Loading branch information
unasra committed Sep 23, 2024
1 parent ac51532 commit 11ee539
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions internal/service/clouddiscovery/providers_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,13 +659,13 @@ resource "bloxone_cloud_discovery_provider" "test_desired_state" {
func testAccProvidersDestinations(viewName, name, providerType, accountPreference, accessIdType, credType, configAccessId, destinationType string) string {
destinationsStr := ""
if destinationType == "IPAM/DHCP" {
destinationsStr = fmt.Sprintf("{\n\t\t\tconfig = {}\n\t\t\tdestination_type = \"IPAM/DHCP\"\n\t\t}")
destinationsStr = fmt.Sprint("{\n\t\t\tconfig = {}\n\t\t\tdestination_type = \"IPAM/DHCP\"\n\t\t}")

Check failure on line 662 in internal/service/clouddiscovery/providers_resource_test.go

View workflow job for this annotation

GitHub Actions / Go Linter

S1039: unnecessary use of fmt.Sprint (gosimple)
}
//if destinationType == "DNS2" {
// destinationsStr = fmt.Sprintf("{\n\t\t\tconfig = {\n\t\t\t\tdns = {\n\t\t\t\t\tview_id = bloxone_dns_view.test.id\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestination_type = \"DNS\"\n\t\t},\n\t\t{\n\t\t\tconfig = {}\n\t\t\tdestination_type = \"IPAM/DHCP\"\n\t\t}")
//}
if destinationType == "DNS" {
destinationsStr = fmt.Sprintf("{\n\t\t\tconfig = {}\n\t\t\tdestination_type = \"IPAM/DHCP\"\n\t\t},\n\t\t{\n\t\t\tconfig = {\n\t\t\t\tdns = {\n\t\t\t\t\tview_id = bloxone_dns_view.test.id\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestination_type = \"DNS\"\n\t\t}")
destinationsStr = fmt.Sprint("{\n\t\t\tconfig = {}\n\t\t\tdestination_type = \"IPAM/DHCP\"\n\t\t},\n\t\t{\n\t\t\tconfig = {\n\t\t\t\tdns = {\n\t\t\t\t\tview_id = bloxone_dns_view.test.id\n\t\t\t\t}\n\t\t\t}\n\t\t\tdestination_type = \"DNS\"\n\t\t}")

Check failure on line 668 in internal/service/clouddiscovery/providers_resource_test.go

View workflow job for this annotation

GitHub Actions / Go Linter

S1039: unnecessary use of fmt.Sprint (gosimple)
}
return fmt.Sprintf(`
resource "bloxone_dns_view" "test" {
Expand All @@ -692,25 +692,25 @@ resource "bloxone_cloud_discovery_provider" "test_destinations" {
`, viewName, name, providerType, accountPreference, accessIdType, credType, configAccessId, destinationsStr)
}

func testAccProvidersDestinationsNull(name string, providerType, accountPreference, accessIdType, credType, configAccessId string) string {
return fmt.Sprintf(`
resource "bloxone_cloud_discovery_provider" "test_destinations" {
name = %q
provider_type = %q
account_preference = %q
credential_preference = {
access_identifier_type = %q
credential_type = %q
}
source_configs = [ {
credential_config = {
access_identifier = %q
}
}]
destinations = []
}
`, name, providerType, accountPreference, accessIdType, credType, configAccessId)
}
//func testAccProvidersDestinationsNull(name string, providerType, accountPreference, accessIdType, credType, configAccessId string) string {
// return fmt.Sprintf(`
//resource "bloxone_cloud_discovery_provider" "test_destinations" {
// name = %q
// provider_type = %q
// account_preference = %q
// credential_preference = {
// access_identifier_type = %q
// credential_type = %q
// }
// source_configs = [ {
// credential_config = {
// access_identifier = %q
// }
// }]
// destinations = []
//}
//`, name, providerType, accountPreference, accessIdType, credType, configAccessId)
//}

func testAccProvidersName(name, providerType, accountPreference, accessIdType, credType, configAccessId string) string {
return fmt.Sprintf(`
Expand Down

0 comments on commit 11ee539

Please sign in to comment.