We don't want to have a copy of the sync.Locker in the
Config since lock value shold not be copied.
Usually Config used as a singleton in different Terraform provider
resources and all of them should use a single sync.Locker instead of
different copies.
This commit changes MutexKV field of the Config to be a reference
instead of a copy and updates MutexKV tests to check that MutexKV is
used in a proper way.
We don't want to have a copy of the
sync.Locker
in theConfig
since lock value shold not be copied.Usually
Config
used as a singleton in different Terraform provider resources and all of them should use a singlesync.Locker
instead of different copies.This commit changes
MutexKV
field of theConfig
to be a reference instead of a copy and updatesMutexKV
tests to check thatMutexKV
is used in a proper way.Currently you can run
govet
linter and find the issue in the following files of the Terraform OpenStack provider: https://github.com/terraform-provider-openstack/terraform-provider-openstack/blob/main/openstack/provider.go#L513 https://github.com/terraform-provider-openstack/terraform-provider-openstack/blob/main/openstack/resource_openstack_networking_router_route_v2.go#L58