From 03ee82b32c4d6e3525cc8ab62bd2676c4d0f0592 Mon Sep 17 00:00:00 2001 From: Dainius Serplis Date: Wed, 1 Sep 2021 20:16:46 +0300 Subject: [PATCH 1/4] make fmt Signed-off-by: Dainius Serplis --- govcd/access_control_catalog_test.go | 1 + govcd/access_control_test.go | 1 + govcd/access_control_vapp_test.go | 1 + govcd/adminorg_administration_test.go | 1 + govcd/adminorg_ldap_test.go | 1 + govcd/adminorg_test.go | 1 + govcd/adminorg_unit_test.go | 1 + govcd/adminvdc_nsxt_test.go | 1 + govcd/adminvdc_test.go | 1 + govcd/api_vcd_test.go | 1 + govcd/api_vcd_test_unit.go | 1 + govcd/api_vcd_versions_test.go | 1 + govcd/catalog_test.go | 1 + govcd/catalogitem_test.go | 1 + govcd/common_test.go | 1 + govcd/disk_test.go | 1 + govcd/edgegateway_test.go | 1 + govcd/edgegateway_unit_test.go | 1 + govcd/entity_test.go | 1 + govcd/external_network_v2_test.go | 1 + govcd/externalnetwork_test.go | 1 + govcd/filter_engine_test.go | 1 + govcd/filter_engine_unit_test.go | 1 + govcd/filter_util_unit_test.go | 1 + govcd/global_role_test.go | 1 + govcd/group_test.go | 1 + govcd/lb_test.go | 1 + govcd/lb_unit_test.go | 1 + govcd/lbappprofile_test.go | 1 + govcd/lbapprule_test.go | 1 + govcd/lbserverpool_test.go | 1 + govcd/lbservicemonitor_test.go | 1 + govcd/lbvirtualserver_test.go | 1 + govcd/media_test.go | 1 + govcd/metadata_test.go | 1 + govcd/nsxt_application_profile_test.go | 1 + govcd/nsxt_edge_cluster_test.go | 1 + govcd/nsxt_edgegateway_test.go | 1 + govcd/nsxt_firewall_group_ip_set_test.go | 1 + govcd/nsxt_firewall_group_security_group_test.go | 1 + govcd/nsxt_firewall_test.go | 1 + govcd/nsxt_importable_switch_test.go | 1 + govcd/nsxt_ipsec_vpn_tunnel_test.go | 1 + govcd/nsxt_nat_rule_test.go | 1 + govcd/nsxt_test.go | 1 + govcd/nsxv_dhcprelay_test.go | 1 + govcd/nsxv_firewall_test.go | 1 + govcd/nsxv_ipset_test.go | 1 + govcd/nsxv_nat_test.go | 1 + govcd/openapi_endpoints_unit_test.go | 1 + govcd/openapi_org_network_test.go | 1 + govcd/openapi_test.go | 1 + govcd/openapi_unit_test.go | 1 + govcd/org_test.go | 1 + govcd/orgvdcnetwork_test.go | 1 + govcd/query_test.go | 1 + govcd/rights_bundle_test.go | 1 + govcd/rights_test.go | 1 + govcd/roles_test.go | 1 + govcd/saml_auth_test.go | 1 + govcd/saml_auth_unit_test.go | 1 + govcd/system_test.go | 1 + govcd/system_unit_test.go | 1 + govcd/task_test.go | 1 + govcd/tenant_context_test.go | 1 + govcd/user_test.go | 1 + govcd/vapp_concurrent_test.go | 1 + govcd/vapp_network_test.go | 1 + govcd/vapp_test.go | 1 + govcd/vapp_vm_test.go | 1 + govcd/vapptemplate_test.go | 1 + govcd/vdc_test.go | 1 + govcd/vdccomputepolicy_test.go | 1 + govcd/vm_affinity_rule_test.go | 1 + govcd/vm_concurrent_test.go | 1 + govcd/vm_dhcp_test.go | 1 + govcd/vm_test.go | 1 + govcd/vm_unit_test.go | 1 + 78 files changed, 78 insertions(+) diff --git a/govcd/access_control_catalog_test.go b/govcd/access_control_catalog_test.go index 06749d55d..373a33ac1 100644 --- a/govcd/access_control_catalog_test.go +++ b/govcd/access_control_catalog_test.go @@ -1,3 +1,4 @@ +//go:build functional || catalog || ALL // +build functional catalog ALL /* diff --git a/govcd/access_control_test.go b/govcd/access_control_test.go index 1e89bc40e..a8d3d0ff3 100644 --- a/govcd/access_control_test.go +++ b/govcd/access_control_test.go @@ -1,3 +1,4 @@ +//go:build functional || vapp || catalog || ALL // +build functional vapp catalog ALL /* diff --git a/govcd/access_control_vapp_test.go b/govcd/access_control_vapp_test.go index 9ea58eb00..d4423b164 100644 --- a/govcd/access_control_vapp_test.go +++ b/govcd/access_control_vapp_test.go @@ -1,3 +1,4 @@ +//go:build functional || vapp || ALL // +build functional vapp ALL /* diff --git a/govcd/adminorg_administration_test.go b/govcd/adminorg_administration_test.go index 1c90de54c..901126c2e 100644 --- a/govcd/adminorg_administration_test.go +++ b/govcd/adminorg_administration_test.go @@ -1,3 +1,4 @@ +//go:build org || functional || ALL // +build org functional ALL /* diff --git a/govcd/adminorg_ldap_test.go b/govcd/adminorg_ldap_test.go index cb077d581..ad7adfa86 100644 --- a/govcd/adminorg_ldap_test.go +++ b/govcd/adminorg_ldap_test.go @@ -1,3 +1,4 @@ +//go:build (user || functional || ALL) && !skipLong // +build user functional ALL // +build !skipLong diff --git a/govcd/adminorg_test.go b/govcd/adminorg_test.go index 96178c1b3..d3f529f07 100644 --- a/govcd/adminorg_test.go +++ b/govcd/adminorg_test.go @@ -1,3 +1,4 @@ +//go:build org || functional || ALL // +build org functional ALL /* diff --git a/govcd/adminorg_unit_test.go b/govcd/adminorg_unit_test.go index 102078300..1fceee338 100644 --- a/govcd/adminorg_unit_test.go +++ b/govcd/adminorg_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL /* diff --git a/govcd/adminvdc_nsxt_test.go b/govcd/adminvdc_nsxt_test.go index e18857bae..e1311097f 100644 --- a/govcd/adminvdc_nsxt_test.go +++ b/govcd/adminvdc_nsxt_test.go @@ -1,3 +1,4 @@ +//go:build org || functional || nsxt || ALL // +build org functional nsxt ALL /* diff --git a/govcd/adminvdc_test.go b/govcd/adminvdc_test.go index a7c6cde55..836a61e75 100644 --- a/govcd/adminvdc_test.go +++ b/govcd/adminvdc_test.go @@ -1,3 +1,4 @@ +//go:build org || functional || ALL // +build org functional ALL /* diff --git a/govcd/api_vcd_test.go b/govcd/api_vcd_test.go index 11fa03381..56a2d8a2a 100644 --- a/govcd/api_vcd_test.go +++ b/govcd/api_vcd_test.go @@ -1,3 +1,4 @@ +//go:build api || openapi || functional || catalog || vapp || gateway || network || org || query || extnetwork || task || vm || vdc || system || disk || lb || lbAppRule || lbAppProfile || lbServerPool || lbServiceMonitor || lbVirtualServer || user || search || nsxv || nsxt || auth || affinity || role || ALL // +build api openapi functional catalog vapp gateway network org query extnetwork task vm vdc system disk lb lbAppRule lbAppProfile lbServerPool lbServiceMonitor lbVirtualServer user search nsxv nsxt auth affinity role ALL /* diff --git a/govcd/api_vcd_test_unit.go b/govcd/api_vcd_test_unit.go index 750bac62c..c6f5c27cc 100644 --- a/govcd/api_vcd_test_unit.go +++ b/govcd/api_vcd_test_unit.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL /* diff --git a/govcd/api_vcd_versions_test.go b/govcd/api_vcd_versions_test.go index 26140ca1a..102b9d540 100644 --- a/govcd/api_vcd_versions_test.go +++ b/govcd/api_vcd_versions_test.go @@ -1,3 +1,4 @@ +//go:build api || functional || ALL // +build api functional ALL /* diff --git a/govcd/catalog_test.go b/govcd/catalog_test.go index c455859dc..33d27b6fd 100644 --- a/govcd/catalog_test.go +++ b/govcd/catalog_test.go @@ -1,3 +1,4 @@ +//go:build catalog || functional || ALL // +build catalog functional ALL /* diff --git a/govcd/catalogitem_test.go b/govcd/catalogitem_test.go index d885535e2..6b5501934 100644 --- a/govcd/catalogitem_test.go +++ b/govcd/catalogitem_test.go @@ -1,3 +1,4 @@ +//go:build catalog || functional || ALL // +build catalog functional ALL /* diff --git a/govcd/common_test.go b/govcd/common_test.go index 8dcc4dc82..5d2e843ea 100644 --- a/govcd/common_test.go +++ b/govcd/common_test.go @@ -1,3 +1,4 @@ +//go:build api || functional || catalog || vapp || gateway || network || org || query || extnetwork || task || vm || vdc || system || disk || lb || lbAppRule || lbAppProfile || lbServerPool || lbServiceMonitor || lbVirtualServer || user || nsxv || nsxt || openapi || affinity || search || ALL // +build api functional catalog vapp gateway network org query extnetwork task vm vdc system disk lb lbAppRule lbAppProfile lbServerPool lbServiceMonitor lbVirtualServer user nsxv nsxt openapi affinity search ALL /* diff --git a/govcd/disk_test.go b/govcd/disk_test.go index 71c3ae60e..630a26a1d 100644 --- a/govcd/disk_test.go +++ b/govcd/disk_test.go @@ -1,3 +1,4 @@ +//go:build disk || functional || ALL // +build disk functional ALL /* diff --git a/govcd/edgegateway_test.go b/govcd/edgegateway_test.go index ec4905541..ab927c9a7 100644 --- a/govcd/edgegateway_test.go +++ b/govcd/edgegateway_test.go @@ -1,3 +1,4 @@ +//go:build gateway || functional || ALL // +build gateway functional ALL /* diff --git a/govcd/edgegateway_unit_test.go b/govcd/edgegateway_unit_test.go index 303c93390..00ab4a205 100644 --- a/govcd/edgegateway_unit_test.go +++ b/govcd/edgegateway_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL /* diff --git a/govcd/entity_test.go b/govcd/entity_test.go index cb8c7a88f..08880bd03 100644 --- a/govcd/entity_test.go +++ b/govcd/entity_test.go @@ -1,3 +1,4 @@ +//go:build api || functional || catalog || org || extnetwork || vm || vdc || system || user || nsxv || network || vapp || vm || affinity || ALL // +build api functional catalog org extnetwork vm vdc system user nsxv network vapp vm affinity ALL /* diff --git a/govcd/external_network_v2_test.go b/govcd/external_network_v2_test.go index b31ed4b5a..ab4248291 100644 --- a/govcd/external_network_v2_test.go +++ b/govcd/external_network_v2_test.go @@ -1,3 +1,4 @@ +//go:build extnetwork || network || functional || openapi || ALL // +build extnetwork network functional openapi ALL /* diff --git a/govcd/externalnetwork_test.go b/govcd/externalnetwork_test.go index 6d1ffcca7..0328798ce 100644 --- a/govcd/externalnetwork_test.go +++ b/govcd/externalnetwork_test.go @@ -1,3 +1,4 @@ +//go:build extnetwork || network || functional || ALL // +build extnetwork network functional ALL /* diff --git a/govcd/filter_engine_test.go b/govcd/filter_engine_test.go index 97354fb5b..d5f89b6c8 100644 --- a/govcd/filter_engine_test.go +++ b/govcd/filter_engine_test.go @@ -1,3 +1,4 @@ +//go:build search || functional || ALL // +build search functional ALL /* diff --git a/govcd/filter_engine_unit_test.go b/govcd/filter_engine_unit_test.go index cdd4d5116..7bf8f24c0 100644 --- a/govcd/filter_engine_unit_test.go +++ b/govcd/filter_engine_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit // +build unit /* diff --git a/govcd/filter_util_unit_test.go b/govcd/filter_util_unit_test.go index 9c60b09b2..7e4e5a5ce 100644 --- a/govcd/filter_util_unit_test.go +++ b/govcd/filter_util_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL /* diff --git a/govcd/global_role_test.go b/govcd/global_role_test.go index f562c1cf8..e4107f162 100644 --- a/govcd/global_role_test.go +++ b/govcd/global_role_test.go @@ -1,3 +1,4 @@ +//go:build functional || openapi || role || ALL // +build functional openapi role ALL /* diff --git a/govcd/group_test.go b/govcd/group_test.go index 9e1f24591..7356b72a8 100644 --- a/govcd/group_test.go +++ b/govcd/group_test.go @@ -1,3 +1,4 @@ +//go:build user || functional || ALL // +build user functional ALL /* diff --git a/govcd/lb_test.go b/govcd/lb_test.go index 5629b3e97..ee1f809ce 100644 --- a/govcd/lb_test.go +++ b/govcd/lb_test.go @@ -1,3 +1,4 @@ +//go:build (lb || functional || integration || ALL) && !skipLong // +build lb functional integration ALL // +build !skipLong diff --git a/govcd/lb_unit_test.go b/govcd/lb_unit_test.go index 88cf72aff..68070a8f9 100644 --- a/govcd/lb_unit_test.go +++ b/govcd/lb_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || lb || lbAppProfile || functional || ALL // +build unit lb lbAppProfile functional ALL /* diff --git a/govcd/lbappprofile_test.go b/govcd/lbappprofile_test.go index ee881209b..2e23c296a 100644 --- a/govcd/lbappprofile_test.go +++ b/govcd/lbappprofile_test.go @@ -1,3 +1,4 @@ +//go:build lb || lbAppProfile || nsxv || functional || ALL // +build lb lbAppProfile nsxv functional ALL /* diff --git a/govcd/lbapprule_test.go b/govcd/lbapprule_test.go index e62cbe6c8..8709cca36 100644 --- a/govcd/lbapprule_test.go +++ b/govcd/lbapprule_test.go @@ -1,3 +1,4 @@ +//go:build lb || lbAppRule || nsxv || functional || ALL // +build lb lbAppRule nsxv functional ALL /* diff --git a/govcd/lbserverpool_test.go b/govcd/lbserverpool_test.go index 9bb48f03a..05308efff 100644 --- a/govcd/lbserverpool_test.go +++ b/govcd/lbserverpool_test.go @@ -1,3 +1,4 @@ +//go:build lb || lbServerPool || nsxv || functional || ALL // +build lb lbServerPool nsxv functional ALL /* diff --git a/govcd/lbservicemonitor_test.go b/govcd/lbservicemonitor_test.go index 5824a187a..6d4a53e5a 100644 --- a/govcd/lbservicemonitor_test.go +++ b/govcd/lbservicemonitor_test.go @@ -1,3 +1,4 @@ +//go:build lb || lbServiceMonitor || nsxv || functional || ALL // +build lb lbServiceMonitor nsxv functional ALL /* diff --git a/govcd/lbvirtualserver_test.go b/govcd/lbvirtualserver_test.go index ec5ed765e..aee744623 100644 --- a/govcd/lbvirtualserver_test.go +++ b/govcd/lbvirtualserver_test.go @@ -1,3 +1,4 @@ +//go:build lb || lbVirtualServer || nsxv || functional || ALL // +build lb lbVirtualServer nsxv functional ALL /* diff --git a/govcd/media_test.go b/govcd/media_test.go index ecdd46ba5..28a14d519 100644 --- a/govcd/media_test.go +++ b/govcd/media_test.go @@ -1,3 +1,4 @@ +//go:build catalog || functional || ALL // +build catalog functional ALL /* diff --git a/govcd/metadata_test.go b/govcd/metadata_test.go index f2ce2826b..6b103874a 100644 --- a/govcd/metadata_test.go +++ b/govcd/metadata_test.go @@ -1,3 +1,4 @@ +//go:build vapp || vdc || metadata || functional || ALL // +build vapp vdc metadata functional ALL /* diff --git a/govcd/nsxt_application_profile_test.go b/govcd/nsxt_application_profile_test.go index 6fa69d1c4..5828a529d 100644 --- a/govcd/nsxt_application_profile_test.go +++ b/govcd/nsxt_application_profile_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_edge_cluster_test.go b/govcd/nsxt_edge_cluster_test.go index e620931a6..bab9fd47c 100644 --- a/govcd/nsxt_edge_cluster_test.go +++ b/govcd/nsxt_edge_cluster_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL /* diff --git a/govcd/nsxt_edgegateway_test.go b/govcd/nsxt_edgegateway_test.go index 1b1dad068..06e95aab0 100644 --- a/govcd/nsxt_edgegateway_test.go +++ b/govcd/nsxt_edgegateway_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_firewall_group_ip_set_test.go b/govcd/nsxt_firewall_group_ip_set_test.go index 113d81490..eb41784bf 100644 --- a/govcd/nsxt_firewall_group_ip_set_test.go +++ b/govcd/nsxt_firewall_group_ip_set_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_firewall_group_security_group_test.go b/govcd/nsxt_firewall_group_security_group_test.go index fa4a286d2..bed52d545 100644 --- a/govcd/nsxt_firewall_group_security_group_test.go +++ b/govcd/nsxt_firewall_group_security_group_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_firewall_test.go b/govcd/nsxt_firewall_test.go index 0661a33a4..1f1031276 100644 --- a/govcd/nsxt_firewall_test.go +++ b/govcd/nsxt_firewall_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_importable_switch_test.go b/govcd/nsxt_importable_switch_test.go index e0b4d2dbb..818bab4cc 100644 --- a/govcd/nsxt_importable_switch_test.go +++ b/govcd/nsxt_importable_switch_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || ALL // +build network nsxt functional ALL /* diff --git a/govcd/nsxt_ipsec_vpn_tunnel_test.go b/govcd/nsxt_ipsec_vpn_tunnel_test.go index ccb6b1c19..6d8565c05 100644 --- a/govcd/nsxt_ipsec_vpn_tunnel_test.go +++ b/govcd/nsxt_ipsec_vpn_tunnel_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_nat_rule_test.go b/govcd/nsxt_nat_rule_test.go index cdad31f50..168846365 100644 --- a/govcd/nsxt_nat_rule_test.go +++ b/govcd/nsxt_nat_rule_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL package govcd diff --git a/govcd/nsxt_test.go b/govcd/nsxt_test.go index e6c77c358..39bc8cc0a 100644 --- a/govcd/nsxt_test.go +++ b/govcd/nsxt_test.go @@ -1,3 +1,4 @@ +//go:build ALL || openapi || functional || nsxt // +build ALL openapi functional nsxt /* diff --git a/govcd/nsxv_dhcprelay_test.go b/govcd/nsxv_dhcprelay_test.go index ed55cea0a..1477adc81 100644 --- a/govcd/nsxv_dhcprelay_test.go +++ b/govcd/nsxv_dhcprelay_test.go @@ -1,3 +1,4 @@ +//go:build nsxv || functional || ALL // +build nsxv functional ALL /* diff --git a/govcd/nsxv_firewall_test.go b/govcd/nsxv_firewall_test.go index c22e4b084..18e97f19d 100644 --- a/govcd/nsxv_firewall_test.go +++ b/govcd/nsxv_firewall_test.go @@ -1,3 +1,4 @@ +//go:build nsxv || edge || firewall || functional || ALL // +build nsxv edge firewall functional ALL /* diff --git a/govcd/nsxv_ipset_test.go b/govcd/nsxv_ipset_test.go index d711e0986..88b786a04 100644 --- a/govcd/nsxv_ipset_test.go +++ b/govcd/nsxv_ipset_test.go @@ -1,3 +1,4 @@ +//go:build nsxv || functional || ALL // +build nsxv functional ALL /* diff --git a/govcd/nsxv_nat_test.go b/govcd/nsxv_nat_test.go index 51d1d4558..21c1abb84 100644 --- a/govcd/nsxv_nat_test.go +++ b/govcd/nsxv_nat_test.go @@ -1,3 +1,4 @@ +//go:build edge || nat || nsxv || functional || ALL // +build edge nat nsxv functional ALL /* diff --git a/govcd/openapi_endpoints_unit_test.go b/govcd/openapi_endpoints_unit_test.go index 48cd4a1c8..7af473d99 100644 --- a/govcd/openapi_endpoints_unit_test.go +++ b/govcd/openapi_endpoints_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL package govcd diff --git a/govcd/openapi_org_network_test.go b/govcd/openapi_org_network_test.go index f5efcfa87..c54d23afd 100644 --- a/govcd/openapi_org_network_test.go +++ b/govcd/openapi_org_network_test.go @@ -1,3 +1,4 @@ +//go:build network || nsxt || functional || openapi || ALL // +build network nsxt functional openapi ALL /* diff --git a/govcd/openapi_test.go b/govcd/openapi_test.go index c3aaf3060..185fa5b99 100644 --- a/govcd/openapi_test.go +++ b/govcd/openapi_test.go @@ -1,3 +1,4 @@ +//go:build functional || openapi || ALL // +build functional openapi ALL /* diff --git a/govcd/openapi_unit_test.go b/govcd/openapi_unit_test.go index fefd7ffba..72edb8257 100644 --- a/govcd/openapi_unit_test.go +++ b/govcd/openapi_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL package govcd diff --git a/govcd/org_test.go b/govcd/org_test.go index 5f0cf4815..83f7776fa 100644 --- a/govcd/org_test.go +++ b/govcd/org_test.go @@ -1,3 +1,4 @@ +//go:build org || functional || ALL // +build org functional ALL /* diff --git a/govcd/orgvdcnetwork_test.go b/govcd/orgvdcnetwork_test.go index 4d16125ee..fae7e32d9 100644 --- a/govcd/orgvdcnetwork_test.go +++ b/govcd/orgvdcnetwork_test.go @@ -1,3 +1,4 @@ +//go:build network || functional || ALL // +build network functional ALL /* diff --git a/govcd/query_test.go b/govcd/query_test.go index 32e8fb158..df9677567 100644 --- a/govcd/query_test.go +++ b/govcd/query_test.go @@ -1,3 +1,4 @@ +//go:build query || functional || ALL // +build query functional ALL /* diff --git a/govcd/rights_bundle_test.go b/govcd/rights_bundle_test.go index 55d24519d..e43470eb1 100644 --- a/govcd/rights_bundle_test.go +++ b/govcd/rights_bundle_test.go @@ -1,3 +1,4 @@ +//go:build functional || openapi || role || ALL // +build functional openapi role ALL /* diff --git a/govcd/rights_test.go b/govcd/rights_test.go index 87e9fe88c..03ccde2d7 100644 --- a/govcd/rights_test.go +++ b/govcd/rights_test.go @@ -1,3 +1,4 @@ +//go:build functional || openapi || role || ALL // +build functional openapi role ALL /* diff --git a/govcd/roles_test.go b/govcd/roles_test.go index 8dedce267..a101365d2 100644 --- a/govcd/roles_test.go +++ b/govcd/roles_test.go @@ -1,3 +1,4 @@ +//go:build functional || openapi || role || ALL // +build functional openapi role ALL /* diff --git a/govcd/saml_auth_test.go b/govcd/saml_auth_test.go index 8e80a75f2..2ae52bf8b 100644 --- a/govcd/saml_auth_test.go +++ b/govcd/saml_auth_test.go @@ -1,3 +1,4 @@ +//go:build auth || functional || ALL // +build auth functional ALL /* diff --git a/govcd/saml_auth_unit_test.go b/govcd/saml_auth_unit_test.go index 891bfbc6c..1f33a7dcc 100644 --- a/govcd/saml_auth_unit_test.go +++ b/govcd/saml_auth_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL /* diff --git a/govcd/system_test.go b/govcd/system_test.go index 55b7f4b44..60c098149 100644 --- a/govcd/system_test.go +++ b/govcd/system_test.go @@ -1,3 +1,4 @@ +//go:build system || functional || ALL // +build system functional ALL /* diff --git a/govcd/system_unit_test.go b/govcd/system_unit_test.go index 7eb89950b..b50a5b80c 100644 --- a/govcd/system_unit_test.go +++ b/govcd/system_unit_test.go @@ -1,3 +1,4 @@ +//go:build unit || ALL // +build unit ALL /* diff --git a/govcd/task_test.go b/govcd/task_test.go index a4e3026c5..fa12f0ad5 100644 --- a/govcd/task_test.go +++ b/govcd/task_test.go @@ -1,3 +1,4 @@ +//go:build task || functional || ALL // +build task functional ALL /* diff --git a/govcd/tenant_context_test.go b/govcd/tenant_context_test.go index 350a59940..7b7857929 100644 --- a/govcd/tenant_context_test.go +++ b/govcd/tenant_context_test.go @@ -1,3 +1,4 @@ +//go:build functional || openapi || ALL // +build functional openapi ALL package govcd diff --git a/govcd/user_test.go b/govcd/user_test.go index 7d5ef3238..25696cf28 100644 --- a/govcd/user_test.go +++ b/govcd/user_test.go @@ -1,3 +1,4 @@ +//go:build user || functional || ALL // +build user functional ALL /* diff --git a/govcd/vapp_concurrent_test.go b/govcd/vapp_concurrent_test.go index a539c629c..1908eb861 100644 --- a/govcd/vapp_concurrent_test.go +++ b/govcd/vapp_concurrent_test.go @@ -1,3 +1,4 @@ +//go:build concurrent // +build concurrent /* diff --git a/govcd/vapp_network_test.go b/govcd/vapp_network_test.go index 104e099b1..f6678f633 100644 --- a/govcd/vapp_network_test.go +++ b/govcd/vapp_network_test.go @@ -1,3 +1,4 @@ +//go:build vapp || functional || ALL // +build vapp functional ALL /* diff --git a/govcd/vapp_test.go b/govcd/vapp_test.go index 056590325..e6b67c013 100644 --- a/govcd/vapp_test.go +++ b/govcd/vapp_test.go @@ -1,3 +1,4 @@ +//go:build vapp || functional || ALL // +build vapp functional ALL /* diff --git a/govcd/vapp_vm_test.go b/govcd/vapp_vm_test.go index 13853fa3c..0c3044179 100644 --- a/govcd/vapp_vm_test.go +++ b/govcd/vapp_vm_test.go @@ -1,3 +1,4 @@ +//go:build vapp || vm || functional || ALL // +build vapp vm functional ALL /* diff --git a/govcd/vapptemplate_test.go b/govcd/vapptemplate_test.go index 7e177645e..fcfefe6f8 100644 --- a/govcd/vapptemplate_test.go +++ b/govcd/vapptemplate_test.go @@ -1,3 +1,4 @@ +//go:build vapp || functional || ALL // +build vapp functional ALL /* diff --git a/govcd/vdc_test.go b/govcd/vdc_test.go index 827743a7b..748c33698 100644 --- a/govcd/vdc_test.go +++ b/govcd/vdc_test.go @@ -1,3 +1,4 @@ +//go:build vdc || functional || ALL // +build vdc functional ALL /* diff --git a/govcd/vdccomputepolicy_test.go b/govcd/vdccomputepolicy_test.go index 3b02265eb..32e165a34 100644 --- a/govcd/vdccomputepolicy_test.go +++ b/govcd/vdccomputepolicy_test.go @@ -1,3 +1,4 @@ +//go:build vdc || functional || openapi || ALL // +build vdc functional openapi ALL /* diff --git a/govcd/vm_affinity_rule_test.go b/govcd/vm_affinity_rule_test.go index 0d343ba9f..87f2fd515 100644 --- a/govcd/vm_affinity_rule_test.go +++ b/govcd/vm_affinity_rule_test.go @@ -1,3 +1,4 @@ +//go:build vdc || affinity || functional || ALL // +build vdc affinity functional ALL /* diff --git a/govcd/vm_concurrent_test.go b/govcd/vm_concurrent_test.go index 6d5b57be7..f054e8043 100644 --- a/govcd/vm_concurrent_test.go +++ b/govcd/vm_concurrent_test.go @@ -1,3 +1,4 @@ +//go:build concurrent // +build concurrent /* diff --git a/govcd/vm_dhcp_test.go b/govcd/vm_dhcp_test.go index 1a3b31315..7d662a721 100644 --- a/govcd/vm_dhcp_test.go +++ b/govcd/vm_dhcp_test.go @@ -1,3 +1,4 @@ +//go:build nsxv || vm || functional || ALL // +build nsxv vm functional ALL /* diff --git a/govcd/vm_test.go b/govcd/vm_test.go index 77ee8b0b4..a54d4fcb1 100644 --- a/govcd/vm_test.go +++ b/govcd/vm_test.go @@ -1,3 +1,4 @@ +//go:build vm || functional || ALL // +build vm functional ALL /* diff --git a/govcd/vm_unit_test.go b/govcd/vm_unit_test.go index 502649bf8..225f14809 100644 --- a/govcd/vm_unit_test.go +++ b/govcd/vm_unit_test.go @@ -1,3 +1,4 @@ +//go:build vm || unit || ALL // +build vm unit ALL /* From 4315e51109dc019ee4bca6b0373843a15d71a627 Mon Sep 17 00:00:00 2001 From: Dainius Serplis Date: Wed, 1 Sep 2021 20:22:04 +0300 Subject: [PATCH 2/4] Add changelog note and switch github workflow Go to 1.17 Signed-off-by: Dainius Serplis --- .changes/v2.13.0/396-improvements.md | 2 ++ .github/workflows/check-code.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .changes/v2.13.0/396-improvements.md diff --git a/.changes/v2.13.0/396-improvements.md b/.changes/v2.13.0/396-improvements.md new file mode 100644 index 000000000..3f5281d66 --- /dev/null +++ b/.changes/v2.13.0/396-improvements.md @@ -0,0 +1,2 @@ +* Align build tags to match go fmt with Go 1.17 [GH-396] +* \ No newline at end of file diff --git a/.github/workflows/check-code.yml b/.github/workflows/check-code.yml index 89b23402b..ab384e9de 100644 --- a/.github/workflows/check-code.yml +++ b/.github/workflows/check-code.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v2 with: - go-version: ^1.15 + go-version: ^1.17 - name: Check out code into the Go module directory uses: actions/checkout@v2 From 4c5d65d16a2020fddd8c50529563fc73284fabe1 Mon Sep 17 00:00:00 2001 From: Dainius Serplis Date: Wed, 1 Sep 2021 20:30:13 +0300 Subject: [PATCH 3/4] Improve test-tags.sh Signed-off-by: Dainius Serplis --- scripts/test-tags.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-tags.sh b/scripts/test-tags.sh index be547f720..d50609a1a 100755 --- a/scripts/test-tags.sh +++ b/scripts/test-tags.sh @@ -17,7 +17,7 @@ then fi start=$(date +%s) -tags=$(head -n 1 api_vcd_test.go | sed -e 's/^.*build //') +tags=$(head -n 1 api_vcd_test.go | sed -e 's/^.*build //;s/|| //g') echo "=== RUN TagsTest" for tag in $tags From ad8c75a15d8a0d65fcebe7c61cb3cec82c162ecd Mon Sep 17 00:00:00 2001 From: Dainius Serplis Date: Wed, 1 Sep 2021 20:33:59 +0300 Subject: [PATCH 4/4] [skip ci] improve changelog Signed-off-by: Dainius Serplis --- .changes/v2.13.0/396-improvements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/v2.13.0/396-improvements.md b/.changes/v2.13.0/396-improvements.md index 3f5281d66..0864ea6ee 100644 --- a/.changes/v2.13.0/396-improvements.md +++ b/.changes/v2.13.0/396-improvements.md @@ -1,2 +1,2 @@ * Align build tags to match go fmt with Go 1.17 [GH-396] -* \ No newline at end of file +* Improve `test-tags.sh` script to handle new build tag format [GH-396]