Repository: digitalocean/doctl
Pull request #1392 (2023-07-18 20:09:23)

Replace github.com/golang/mock with Uber's version
https://github.com/golang/mock project has the following comment:

Update, June 2023: This repo and tool are no longer maintained. Please see [go.uber.org/mock](https://github.com/uber/mock) for a maintained fork instead.


Patch:
diff --git a/do/mocks/AccountService.go b/do/mocks/AccountService.go
index bfe9928b..3e13aed8 100644
--- a/do/mocks/AccountService.go
+++ b/do/mocks/AccountService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockAccountService is a mock of AccountService interface.
diff --git a/do/mocks/ActionService.go b/do/mocks/ActionService.go
index 692b4fce..bb68475f 100644
--- a/do/mocks/ActionService.go
+++ b/do/mocks/ActionService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockActionsService is a mock of ActionsService interface.
diff --git a/do/mocks/AppsService.go b/do/mocks/AppsService.go
index 40cb8e1e..b339f675 100644
--- a/do/mocks/AppsService.go
+++ b/do/mocks/AppsService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockAppsService is a mock of AppsService interface.
diff --git a/do/mocks/BalanceService.go b/do/mocks/BalanceService.go
index dc3b8606..37f2b898 100644
--- a/do/mocks/BalanceService.go
+++ b/do/mocks/BalanceService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockBalanceService is a mock of BalanceService interface.
diff --git a/do/mocks/BillingHistoryService.go b/do/mocks/BillingHistoryService.go
index bcd7fda1..eead9d87 100644
--- a/do/mocks/BillingHistoryService.go
+++ b/do/mocks/BillingHistoryService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockBillingHistoryService is a mock of BillingHistoryService interface.
diff --git a/do/mocks/CDNsService.go b/do/mocks/CDNsService.go
index ac96475d..b613c66a 100644
--- a/do/mocks/CDNsService.go
+++ b/do/mocks/CDNsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockCDNsService is a mock of CDNsService interface.
diff --git a/do/mocks/CertificatesService.go b/do/mocks/CertificatesService.go
index b87ece3a..3de2024b 100644
--- a/do/mocks/CertificatesService.go
+++ b/do/mocks/CertificatesService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockCertificatesService is a mock of CertificatesService interface.
diff --git a/do/mocks/DatabasesService.go b/do/mocks/DatabasesService.go
index 847d05be..e4a8707d 100644
--- a/do/mocks/DatabasesService.go
+++ b/do/mocks/DatabasesService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockDatabasesService is a mock of DatabasesService interface.
diff --git a/do/mocks/DomainService.go b/do/mocks/DomainService.go
index 8c5b4355..e5b01e21 100644
--- a/do/mocks/DomainService.go
+++ b/do/mocks/DomainService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockDomainsService is a mock of DomainsService interface.
diff --git a/do/mocks/DropletActionService.go b/do/mocks/DropletActionService.go
index 7dc511ad..cd83d3a9 100644
--- a/do/mocks/DropletActionService.go
+++ b/do/mocks/DropletActionService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockDropletActionsService is a mock of DropletActionsService interface.
diff --git a/do/mocks/DropletsService.go b/do/mocks/DropletsService.go
index c1592dcc..87b7ae8c 100644
--- a/do/mocks/DropletsService.go
+++ b/do/mocks/DropletsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockDropletsService is a mock of DropletsService interface.
diff --git a/do/mocks/FirewallsService.go b/do/mocks/FirewallsService.go
index 7a10f2e8..0e496c16 100644
--- a/do/mocks/FirewallsService.go
+++ b/do/mocks/FirewallsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockFirewallsService is a mock of FirewallsService interface.
diff --git a/do/mocks/ImageActionsService.go b/do/mocks/ImageActionsService.go
index 085eaff7..ccf47e84 100644
--- a/do/mocks/ImageActionsService.go
+++ b/do/mocks/ImageActionsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockImageActionsService is a mock of ImageActionsService interface.
diff --git a/do/mocks/ImageService.go b/do/mocks/ImageService.go
index a59c7abb..0c04c40f 100644
--- a/do/mocks/ImageService.go
+++ b/do/mocks/ImageService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockImagesService is a mock of ImagesService interface.
diff --git a/do/mocks/InvoicesService.go b/do/mocks/InvoicesService.go
index 8cdcab53..193005a0 100644
--- a/do/mocks/InvoicesService.go
+++ b/do/mocks/InvoicesService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockInvoicesService is a mock of InvoicesService interface.
diff --git a/do/mocks/KeysService.go b/do/mocks/KeysService.go
index 1edc835f..722f2b47 100644
--- a/do/mocks/KeysService.go
+++ b/do/mocks/KeysService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockKeysService is a mock of KeysService interface.
diff --git a/do/mocks/KubernetesService.go b/do/mocks/KubernetesService.go
index fc5c2f6b..001f230a 100644
--- a/do/mocks/KubernetesService.go
+++ b/do/mocks/KubernetesService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockKubernetesService is a mock of KubernetesService interface.
diff --git a/do/mocks/Listen.go b/do/mocks/Listen.go
index 382d9797..156e5685 100644
--- a/do/mocks/Listen.go
+++ b/do/mocks/Listen.go
@@ -7,7 +7,7 @@ package mocks
 import (
 	reflect "reflect"
 
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockListenerService is a mock of ListenerService interface.
diff --git a/do/mocks/Listener.go b/do/mocks/Listener.go
index 1e95660f..4403361b 100644
--- a/do/mocks/Listener.go
+++ b/do/mocks/Listener.go
@@ -7,7 +7,7 @@ package mocks
 import (
 	reflect "reflect"
 
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockListenerSerive is a mock of ListenerSerive interface.
diff --git a/do/mocks/LoadBalancersService.go b/do/mocks/LoadBalancersService.go
index 11de02f3..0f46533f 100644
--- a/do/mocks/LoadBalancersService.go
+++ b/do/mocks/LoadBalancersService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockLoadBalancersService is a mock of LoadBalancersService interface.
diff --git a/do/mocks/MonitoringService.go b/do/mocks/MonitoringService.go
index 9d102cbe..b63a0902 100644
--- a/do/mocks/MonitoringService.go
+++ b/do/mocks/MonitoringService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockMonitoringService is a mock of MonitoringService interface.
diff --git a/do/mocks/OAuthService.go b/do/mocks/OAuthService.go
index 1e1e6d7a..3a133c65 100644
--- a/do/mocks/OAuthService.go
+++ b/do/mocks/OAuthService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockOAuthService is a mock of OAuthService interface.
diff --git a/do/mocks/OneClickService.go b/do/mocks/OneClickService.go
index 89f2ec8a..970fcff5 100644
--- a/do/mocks/OneClickService.go
+++ b/do/mocks/OneClickService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockOneClickService is a mock of OneClickService interface.
diff --git a/do/mocks/ProjectsService.go b/do/mocks/ProjectsService.go
index 8781a14d..47071d28 100644
--- a/do/mocks/ProjectsService.go
+++ b/do/mocks/ProjectsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockProjectsService is a mock of ProjectsService interface.
diff --git a/do/mocks/RegionsService.go b/do/mocks/RegionsService.go
index 71caeee4..d6faad52 100644
--- a/do/mocks/RegionsService.go
+++ b/do/mocks/RegionsService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockRegionsService is a mock of RegionsService interface.
diff --git a/do/mocks/RegistryService.go b/do/mocks/RegistryService.go
index 2ebd3c3b..a075d0a9 100644
--- a/do/mocks/RegistryService.go
+++ b/do/mocks/RegistryService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockRegistryService is a mock of RegistryService interface.
diff --git a/do/mocks/ReservedIPActionsService.go b/do/mocks/ReservedIPActionsService.go
index c8db2cbb..771a3f25 100644
--- a/do/mocks/ReservedIPActionsService.go
+++ b/do/mocks/ReservedIPActionsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockReservedIPActionsService is a mock of ReservedIPActionsService interface.
diff --git a/do/mocks/ReservedIPsService.go b/do/mocks/ReservedIPsService.go
index 30e4ae56..a0e2e141 100644
--- a/do/mocks/ReservedIPsService.go
+++ b/do/mocks/ReservedIPsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockReservedIPsService is a mock of ReservedIPsService interface.
diff --git a/do/mocks/Runner.go b/do/mocks/Runner.go
index 98e89f5a..f27ef80f 100644
--- a/do/mocks/Runner.go
+++ b/do/mocks/Runner.go
@@ -7,7 +7,7 @@ package mocks
 import (
 	reflect "reflect"
 
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockRunner is a mock of Runner interface.
diff --git a/do/mocks/ServerlessService.go b/do/mocks/ServerlessService.go
index d3ab6581..a83d1054 100644
--- a/do/mocks/ServerlessService.go
+++ b/do/mocks/ServerlessService.go
@@ -11,7 +11,7 @@ import (
 
 	whisk "github.com/apache/openwhisk-client-go/whisk"
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockServerlessService is a mock of ServerlessService interface.
diff --git a/do/mocks/SizesService.go b/do/mocks/SizesService.go
index fef5e350..59433d65 100644
--- a/do/mocks/SizesService.go
+++ b/do/mocks/SizesService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockSizesService is a mock of SizesService interface.
diff --git a/do/mocks/SnapshotsService.go b/do/mocks/SnapshotsService.go
index 59ce2c91..dc7bc7a0 100644
--- a/do/mocks/SnapshotsService.go
+++ b/do/mocks/SnapshotsService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockSnapshotsService is a mock of SnapshotsService interface.
diff --git a/do/mocks/TagsService.go b/do/mocks/TagsService.go
index b70b881b..f5b44bb6 100644
--- a/do/mocks/TagsService.go
+++ b/do/mocks/TagsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockTagsService is a mock of TagsService interface.
diff --git a/do/mocks/UptimeChecksService.go b/do/mocks/UptimeChecksService.go
index 951ba6e3..fe191029 100644
--- a/do/mocks/UptimeChecksService.go
+++ b/do/mocks/UptimeChecksService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockUptimeChecksService is a mock of UptimeChecksService interface.
diff --git a/do/mocks/VPCsService.go b/do/mocks/VPCsService.go
index cbf98473..5a865c90 100644
--- a/do/mocks/VPCsService.go
+++ b/do/mocks/VPCsService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockVPCsService is a mock of VPCsService interface.
diff --git a/do/mocks/VolumeActionsService.go b/do/mocks/VolumeActionsService.go
index 4cf9799b..a1c0a3b6 100644
--- a/do/mocks/VolumeActionsService.go
+++ b/do/mocks/VolumeActionsService.go
@@ -8,7 +8,7 @@ import (
 	reflect "reflect"
 
 	do "github.com/digitalocean/doctl/do"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockVolumeActionsService is a mock of VolumeActionsService interface.
diff --git a/do/mocks/VolumesService.go b/do/mocks/VolumesService.go
index b4df6695..b1b5aa61 100644
--- a/do/mocks/VolumesService.go
+++ b/do/mocks/VolumesService.go
@@ -9,7 +9,7 @@ import (
 
 	do "github.com/digitalocean/doctl/do"
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockVolumesService is a mock of VolumesService interface.
diff --git a/go.mod b/go.mod
index 43bcf6d3..1758e5b7 100644
--- a/go.mod
+++ b/go.mod
@@ -12,7 +12,6 @@ require (
 	github.com/dustin/go-humanize v1.0.0
 	github.com/fatih/color v1.13.0
 	github.com/gobwas/glob v0.2.3
-	github.com/golang/mock v1.6.0
 	github.com/google/go-querystring v1.1.0 // indirect
 	github.com/google/uuid v1.3.0
 	github.com/gorilla/websocket v1.5.0
@@ -55,6 +54,7 @@ require (
 	github.com/muesli/reflow v0.3.0
 	github.com/muesli/termenv v0.12.0
 	github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
+	go.uber.org/mock v0.2.0
 	golang.org/x/term v0.5.0
 	gopkg.in/yaml.v3 v3.0.1
 )
diff --git a/go.sum b/go.sum
index 627173c3..0b84fb20 100644
--- a/go.sum
+++ b/go.sum
@@ -91,7 +91,6 @@ github.com/containerd/containerd v1.6.18/go.mod h1:1RdCUu95+gc2v9t3IL+zIlpClSmew
 github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg=
 github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
 github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
 github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
 github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
 github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -170,8 +169,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt
 github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
 github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
 github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
-github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
-github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
 github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
 github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -255,8 +252,6 @@ github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:
 github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
 github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
-github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
 github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
 github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
 github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg=
@@ -415,8 +410,6 @@ github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
 github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo=
 github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
 github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
-github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q=
-github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g=
 github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I=
 github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0=
 github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
@@ -453,13 +446,14 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
 github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
 go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
 go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
 go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
+go.uber.org/mock v0.2.0 h1:TaP3xedm7JaAgScZO7tlvlKrqT0p7I6OsdGB5YNSMDU=
+go.uber.org/mock v0.2.0/go.mod h1:J0y0rp9L3xiff1+ZBfKxlC1fz2+aO16tw0tsDOixfuM=
 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
 golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
 golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -504,7 +498,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -542,7 +535,6 @@ golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwY
 golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
 golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
 golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
 golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
@@ -567,7 +559,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ
 golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -611,10 +602,8 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -700,7 +689,6 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f
 golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
 golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
 golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
 golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
 golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
diff --git a/internal/apps/builder/builder.go b/internal/apps/builder/builder.go
index d14b0f8d..702eaf2f 100644
--- a/internal/apps/builder/builder.go
+++ b/internal/apps/builder/builder.go
@@ -1,4 +1,4 @@
-//go:generate go run github.com/golang/mock/mockgen -source builder.go -package builder -destination builder_mock.go ComponentBuilderFactory ComponentBuilder
+//go:generate go run go.uber.org/mock/mockgen -source builder.go -package builder -destination builder_mock.go ComponentBuilderFactory ComponentBuilder
 
 package builder
 
diff --git a/internal/apps/builder/builder_mock.go b/internal/apps/builder/builder_mock.go
index 95acd7c5..e3ec1132 100644
--- a/internal/apps/builder/builder_mock.go
+++ b/internal/apps/builder/builder_mock.go
@@ -9,7 +9,7 @@ import (
 	reflect "reflect"
 
 	godo "github.com/digitalocean/godo"
-	gomock "github.com/golang/mock/gomock"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockComponentBuilderFactory is a mock of ComponentBuilderFactory interface.
diff --git a/internal/apps/builder/container.go b/internal/apps/builder/container.go
index e29aa766..53814a5e 100644
--- a/internal/apps/builder/container.go
+++ b/internal/apps/builder/container.go
@@ -1,4 +1,4 @@
-//go:generate go run github.com/golang/mock/mockgen -source container.go -package builder -destination container_mock.go DockerEngineClient
+//go:generate go run go.uber.org/mock/mockgen -source container.go -package builder -destination container_mock.go DockerEngineClient
 
 package builder
 
diff --git a/internal/apps/builder/container_mock.go b/internal/apps/builder/container_mock.go
index 8baa1cbe..e52679f2 100644
--- a/internal/apps/builder/container_mock.go
+++ b/internal/apps/builder/container_mock.go
@@ -12,8 +12,8 @@ import (
 	types "github.com/docker/docker/api/types"
 	container "github.com/docker/docker/api/types/container"
 	network "github.com/docker/docker/api/types/network"
-	gomock "github.com/golang/mock/gomock"
 	v1 "github.com/opencontainers/image-spec/specs-go/v1"
+	gomock "go.uber.org/mock/gomock"
 )
 
 // MockDockerEngineClient is a mock of DockerEngineClient interface.
diff --git a/scripts/regenmocks.sh b/scripts/regenmocks.sh
index 4fc6ef5b..1e53bd73 100755
--- a/scripts/regenmocks.sh
+++ b/scripts/regenmocks.sh
@@ -6,7 +6,7 @@ set -euo pipefail
 
 cd "do"
 
-go install -mod=readonly github.com/golang/mock/mockgen@latest
+go install -mod=readonly go.uber.org/mock/mockgen@latest
 
 mockgen -source account.go -package=mocks AccountService > mocks/AccountService.go
 mockgen -source actions.go -package=mocks ActionService > mocks/ActionService.go
diff --git a/tools/tools.go b/tools/tools.go
index e4b75f1a..c2b6de0e 100644
--- a/tools/tools.go
+++ b/tools/tools.go
@@ -5,8 +5,8 @@
 
 package tools
 
-//go:generate go install github.com/golang/mock/mockgen
+//go:generate go install go.uber.org/mock/mockgen
 
 import (
-	_ "github.com/golang/mock/mockgen"
+	_ "go.uber.org/mock/mockgen"
 )
diff --git a/vendor/github.com/golang/mock/AUTHORS b/vendor/go.uber.org/mock/AUTHORS
similarity index 100%
rename from vendor/github.com/golang/mock/AUTHORS
rename to vendor/go.uber.org/mock/AUTHORS
diff --git a/vendor/github.com/golang/mock/CONTRIBUTORS b/vendor/go.uber.org/mock/CONTRIBUTORS
similarity index 100%
rename from vendor/github.com/golang/mock/CONTRIBUTORS
rename to vendor/go.uber.org/mock/CONTRIBUTORS
diff --git a/vendor/github.com/golang/mock/LICENSE b/vendor/go.uber.org/mock/LICENSE
similarity index 100%
rename from vendor/github.com/golang/mock/LICENSE
rename to vendor/go.uber.org/mock/LICENSE
diff --git a/vendor/github.com/golang/mock/gomock/call.go b/vendor/go.uber.org/mock/gomock/call.go
similarity index 90%
rename from vendor/github.com/golang/mock/gomock/call.go
rename to vendor/go.uber.org/mock/gomock/call.go
index 13c9f44b..98881596 100644
--- a/vendor/github.com/golang/mock/gomock/call.go
+++ b/vendor/go.uber.org/mock/gomock/call.go
@@ -108,19 +108,25 @@ func (c *Call) MaxTimes(n int) *Call {
 // DoAndReturn declares the action to run when the call is matched.
 // The return values from this function are returned by the mocked function.
 // It takes an interface{} argument to support n-arity functions.
+// The anonymous function must match the function signature mocked method.
 func (c *Call) DoAndReturn(f interface{}) *Call {
 	// TODO: Check arity and types here, rather than dying badly elsewhere.
 	v := reflect.ValueOf(f)
 
 	c.addAction(func(args []interface{}) []interface{} {
 		c.t.Helper()
-		vArgs := make([]reflect.Value, len(args))
 		ft := v.Type()
 		if c.methodType.NumIn() != ft.NumIn() {
-			c.t.Fatalf("wrong number of arguments in DoAndReturn func for %T.%v: got %d, want %d [%s]",
-				c.receiver, c.method, ft.NumIn(), c.methodType.NumIn(), c.origin)
+			if ft.IsVariadic() {
+				c.t.Fatalf("wrong number of arguments in DoAndReturn func for %T.%v The function signature must match the mocked method, a variadic function cannot be used.",
+					c.receiver, c.method)
+			} else {
+				c.t.Fatalf("wrong number of arguments in DoAndReturn func for %T.%v: got %d, want %d [%s]",
+					c.receiver, c.method, ft.NumIn(), c.methodType.NumIn(), c.origin)
+			}
 			return nil
 		}
+		vArgs := make([]reflect.Value, len(args))
 		for i := 0; i < len(args); i++ {
 			if args[i] != nil {
 				vArgs[i] = reflect.ValueOf(args[i])
@@ -143,19 +149,25 @@ func (c *Call) DoAndReturn(f interface{}) *Call {
 // return values are ignored to retain backward compatibility. To use the
 // return values call DoAndReturn.
 // It takes an interface{} argument to support n-arity functions.
+// The anonymous function must match the function signature mocked method.
 func (c *Call) Do(f interface{}) *Call {
 	// TODO: Check arity and types here, rather than dying badly elsewhere.
 	v := reflect.ValueOf(f)
 
 	c.addAction(func(args []interface{}) []interface{} {
 		c.t.Helper()
-		if c.methodType.NumIn() != v.Type().NumIn() {
-			c.t.Fatalf("wrong number of arguments in Do func for %T.%v: got %d, want %d [%s]",
-				c.receiver, c.method, v.Type().NumIn(), c.methodType.NumIn(), c.origin)
+		ft := v.Type()
+		if c.methodType.NumIn() != ft.NumIn() {
+			if ft.IsVariadic() {
+				c.t.Fatalf("wrong number of arguments in Do func for %T.%v The function signature must match the mocked method, a variadic function cannot be used.",
+					c.receiver, c.method)
+			} else {
+				c.t.Fatalf("wrong number of arguments in Do func for %T.%v: got %d, want %d [%s]",
+					c.receiver, c.method, ft.NumIn(), c.methodType.NumIn(), c.origin)
+			}
 			return nil
 		}
 		vArgs := make([]reflect.Value, len(args))
-		ft := v.Type()
 		for i := 0; i < len(args); i++ {
 			if args[i] != nil {
 				vArgs[i] = reflect.ValueOf(args[i])
@@ -217,8 +229,8 @@ func (c *Call) Times(n int) *Call {
 }
 
 // SetArg declares an action that will set the nth argument's value,
-// indirected through a pointer. Or, in the case of a slice, SetArg
-// will copy value's elements into the nth argument.
+// indirected through a pointer. Or, in the case of a slice and map, SetArg
+// will copy value's elements/key-value pairs into the nth argument.
 func (c *Call) SetArg(n int, value interface{}) *Call {
 	c.t.Helper()
 
@@ -243,8 +255,10 @@ func (c *Call) SetArg(n int, value interface{}) *Call {
 		// nothing to do
 	case reflect.Slice:
 		// nothing to do
+	case reflect.Map:
+		// nothing to do
 	default:
-		c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice type %v [%s]",
+		c.t.Fatalf("SetArg(%d, ...) referring to argument of non-pointer non-interface non-slice non-map type %v [%s]",
 			n, at, c.origin)
 	}
 
@@ -253,6 +267,8 @@ func (c *Call) SetArg(n int, value interface{}) *Call {
 		switch reflect.TypeOf(args[n]).Kind() {
 		case reflect.Slice:
 			setSlice(args[n], v)
+		case reflect.Map:
+			setMap(args[n], v)
 		default:
 			reflect.ValueOf(args[n]).Elem().Set(v)
 		}
@@ -432,6 +448,16 @@ func setSlice(arg interface{}, v reflect.Value) {
 	}
 }
 
+func setMap(arg interface{}, v reflect.Value) {
+	va := reflect.ValueOf(arg)
+	for _, e := range va.MapKeys() {
+		va.SetMapIndex(e, reflect.Value{})
+	}
+	for _, e := range v.MapKeys() {
+		va.SetMapIndex(e, v.MapIndex(e))
+	}
+}
+
 func (c *Call) addAction(action func([]interface{}) []interface{}) {
 	c.actions = append(c.actions, action)
 }
diff --git a/vendor/github.com/golang/mock/gomock/callset.go b/vendor/go.uber.org/mock/gomock/callset.go
similarity index 72%
rename from vendor/github.com/golang/mock/gomock/callset.go
rename to vendor/go.uber.org/mock/gomock/callset.go
index 49dba787..f2131a14 100644
--- a/vendor/github.com/golang/mock/gomock/callset.go
+++ b/vendor/go.uber.org/mock/gomock/callset.go
@@ -18,15 +18,19 @@ import (
 	"bytes"
 	"errors"
 	"fmt"
+	"sync"
 )
 
 // callSet represents a set of expected calls, indexed by receiver and method
 // name.
 type callSet struct {
 	// Calls that are still expected.
-	expected map[callSetKey][]*Call
+	expected   map[callSetKey][]*Call
+	expectedMu *sync.Mutex
 	// Calls that have been exhausted.
 	exhausted map[callSetKey][]*Call
+	// when set to true, existing call expectations are overridden when new call expectations are made
+	allowOverride bool
 }
 
 // callSetKey is the key in the maps in callSet
@@ -36,22 +40,47 @@ type callSetKey struct {
 }
 
 func newCallSet() *callSet {
-	return &callSet{make(map[callSetKey][]*Call), make(map[callSetKey][]*Call)}
+	return &callSet{
+		expected:   make(map[callSetKey][]*Call),
+		expectedMu: &sync.Mutex{},
+		exhausted:  make(map[callSetKey][]*Call),
+	}
+}
+
+func newOverridableCallSet() *callSet {
+	return &callSet{
+		expected:      make(map[callSetKey][]*Call),
+		expectedMu: &sync.Mutex{},
+		exhausted:     make(map[callSetKey][]*Call),
+		allowOverride: true,
+	}
 }
 
 // Add adds a new expected call.
 func (cs callSet) Add(call *Call) {
 	key := callSetKey{call.receiver, call.method}
+
+	cs.expectedMu.Lock()
+	defer cs.expectedMu.Unlock()
+
 	m := cs.expected
 	if call.exhausted() {
 		m = cs.exhausted
 	}
+	if cs.allowOverride {
+		m[key] = make([]*Call, 0)
+	}
+
 	m[key] = append(m[key], call)
 }
 
 // Remove removes an expected call.
 func (cs callSet) Remove(call *Call) {
 	key := callSetKey{call.receiver, call.method}
+
+	cs.expectedMu.Lock()
+	defer cs.expectedMu.Unlock()
+
 	calls := cs.expected[key]
 	for i, c := range calls {
 		if c == call {
@@ -67,6 +96,9 @@ func (cs callSet) Remove(call *Call) {
 func (cs callSet) FindMatch(receiver interface{}, method string, args []interface{}) (*Call, error) {
 	key := callSetKey{receiver, method}
 
+	cs.expectedMu.Lock()
+	defer cs.expectedMu.Unlock()
+
 	// Search through the expected calls.
 	expected := cs.expected[key]
 	var callsErrors bytes.Buffer
@@ -101,6 +133,9 @@ func (cs callSet) FindMatch(receiver interface{}, method string, args []interfac
 
 // Failures returns the calls that are not satisfied.
 func (cs callSet) Failures() []*Call {
+	cs.expectedMu.Lock()
+	defer cs.expectedMu.Unlock()
+
 	failures := make([]*Call, 0, len(cs.expected))
 	for _, calls := range cs.expected {
 		for _, call := range calls {
@@ -111,3 +146,19 @@ func (cs callSet) Failures() []*Call {
 	}
 	return failures
 }
+
+// Satisfied returns true in case all expected calls in this callSet are satisfied.
+func (cs callSet) Satisfied() bool {
+	cs.expectedMu.Lock()
+	defer cs.expectedMu.Unlock()
+
+	for _, calls := range cs.expected {
+		for _, call := range calls {
+			if !call.satisfied() {
+				return false
+			}
+		}
+	}
+
+	return true
+}
diff --git a/vendor/github.com/golang/mock/gomock/controller.go b/vendor/go.uber.org/mock/gomock/controller.go
similarity index 80%
rename from vendor/github.com/golang/mock/gomock/controller.go
rename to vendor/go.uber.org/mock/gomock/controller.go
index f054200d..de904c8c 100644
--- a/vendor/github.com/golang/mock/gomock/controller.go
+++ b/vendor/go.uber.org/mock/gomock/controller.go
@@ -12,44 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Package gomock is a mock framework for Go.
-//
-// Standard usage:
-//   (1) Define an interface that you wish to mock.
-//         type MyInterface interface {
-//           SomeMethod(x int64, y string)
-//         }
-//   (2) Use mockgen to generate a mock from the interface.
-//   (3) Use the mock in a test:
-//         func TestMyThing(t *testing.T) {
-//           mockCtrl := gomock.NewController(t)
-//           defer mockCtrl.Finish()
-//
-//           mockObj := something.NewMockMyInterface(mockCtrl)
-//           mockObj.EXPECT().SomeMethod(4, "blah")
-//           // pass mockObj to a real object and play with it.
-//         }
-//
-// By default, expected calls are not enforced to run in any particular order.
-// Call order dependency can be enforced by use of InOrder and/or Call.After.
-// Call.After can create more varied call order dependencies, but InOrder is
-// often more convenient.
-//
-// The following examples create equivalent call order dependencies.
-//
-// Example of using Call.After to chain expected call order:
-//
-//     firstCall := mockObj.EXPECT().SomeMethod(1, "first")
-//     secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall)
-//     mockObj.EXPECT().SomeMethod(3, "third").After(secondCall)
-//
-// Example of using InOrder to declare expected call order:
-//
-//     gomock.InOrder(
-//         mockObj.EXPECT().SomeMethod(1, "first"),
-//         mockObj.EXPECT().SomeMethod(2, "second"),
-//         mockObj.EXPECT().SomeMethod(3, "third"),
-//     )
 package gomock
 
 import (
@@ -89,24 +51,24 @@ type cleanuper interface {
 // goroutines. Each test should create a new Controller and invoke Finish via
 // defer.
 //
-//   func TestFoo(t *testing.T) {
-//     ctrl := gomock.NewController(t)
-//     defer ctrl.Finish()
-//     // ..
-//   }
+//	func TestFoo(t *testing.T) {
+//	  ctrl := gomock.NewController(t)
+//	  defer ctrl.Finish()
+//	  // ..
+//	}
 //
-//   func TestBar(t *testing.T) {
-//     t.Run("Sub-Test-1", st) {
-//       ctrl := gomock.NewController(st)
-//       defer ctrl.Finish()
-//       // ..
-//     })
-//     t.Run("Sub-Test-2", st) {
-//       ctrl := gomock.NewController(st)
-//       defer ctrl.Finish()
-//       // ..
-//     })
-//   })
+//	func TestBar(t *testing.T) {
+//	  t.Run("Sub-Test-1", st) {
+//	    ctrl := gomock.NewController(st)
+//	    defer ctrl.Finish()
+//	    // ..
+//	  })
+//	  t.Run("Sub-Test-2", st) {
+//	    ctrl := gomock.NewController(st)
+//	    defer ctrl.Finish()
+//	    // ..
+//	  })
+//	})
 type Controller struct {
 	// T should only be called within a generated mock. It is not intended to
 	// be used in user code and may be changed in future versions. T is the
@@ -124,7 +86,7 @@ type Controller struct {
 //
 // New in go1.14+, if you are passing a *testing.T into this function you no
 // longer need to call ctrl.Finish() in your test methods.
-func NewController(t TestReporter) *Controller {
+func NewController(t TestReporter, opts ...ControllerOption) *Controller {
 	h, ok := t.(TestHelper)
 	if !ok {
 		h = &nopTestHelper{t}
@@ -133,6 +95,9 @@ func NewController(t TestReporter) *Controller {
 		T:             h,
 		expectedCalls: newCallSet(),
 	}
+	for _, opt := range opts {
+		opt.apply(ctrl)
+	}
 	if c, ok := isCleanuper(ctrl.T); ok {
 		c.Cleanup(func() {
 			ctrl.T.Helper()
@@ -143,6 +108,23 @@ func NewController(t TestReporter) *Controller {
 	return ctrl
 }
 
+// ControllerOption configures how a Controller should behave.
+type ControllerOption interface {
+	apply(*Controller)
+}
+
+type overridableExpectationsOption struct{}
+
+// WithOverridableExpectations allows for overridable call expectations
+// i.e., subsequent call expectations override existing call expectations
+func WithOverridableExpectations() overridableExpectationsOption {
+	return overridableExpectationsOption{}
+}
+
+func (o overridableExpectationsOption) apply(ctrl *Controller) {
+	ctrl.expectedCalls = newOverridableCallSet()
+}
+
 type cancelReporter struct {
 	t      TestHelper
 	cancel func()
@@ -269,6 +251,12 @@ func (ctrl *Controller) Finish() {
 	ctrl.finish(false, err)
 }
 
+// Satisfied returns whether all expected calls bound to this Controller have been satisfied.
+// Calling Finish is then guaranteed to not fail due to missing calls.
+func (ctrl *Controller) Satisfied() bool {
+	return ctrl.expectedCalls.Satisfied()
+}
+
 func (ctrl *Controller) finish(cleanup bool, panicErr interface{}) {
 	ctrl.T.Helper()
 
diff --git a/vendor/go.uber.org/mock/gomock/doc.go b/vendor/go.uber.org/mock/gomock/doc.go
new file mode 100644
index 00000000..f1a304fb
--- /dev/null
+++ b/vendor/go.uber.org/mock/gomock/doc.go
@@ -0,0 +1,60 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package gomock is a mock framework for Go.
+//
+// Standard usage:
+//
+//	(1) Define an interface that you wish to mock.
+//	      type MyInterface interface {
+//	        SomeMethod(x int64, y string)
+//	      }
+//	(2) Use mockgen to generate a mock from the interface.
+//	(3) Use the mock in a test:
+//	      func TestMyThing(t *testing.T) {
+//	        mockCtrl := gomock.NewController(t)//
+//	        mockObj := something.NewMockMyInterface(mockCtrl)
+//	        mockObj.EXPECT().SomeMethod(4, "blah")
+//	        // pass mockObj to a real object and play with it.
+//	      }
+//
+// By default, expected calls are not enforced to run in any particular order.
+// Call order dependency can be enforced by use of InOrder and/or Call.After.
+// Call.After can create more varied call order dependencies, but InOrder is
+// often more convenient.
+//
+// The following examples create equivalent call order dependencies.
+//
+// Example of using Call.After to chain expected call order:
+//
+//	firstCall := mockObj.EXPECT().SomeMethod(1, "first")
+//	secondCall := mockObj.EXPECT().SomeMethod(2, "second").After(firstCall)
+//	mockObj.EXPECT().SomeMethod(3, "third").After(secondCall)
+//
+// Example of using InOrder to declare expected call order:
+//
+//	gomock.InOrder(
+//	    mockObj.EXPECT().SomeMethod(1, "first"),
+//	    mockObj.EXPECT().SomeMethod(2, "second"),
+//	    mockObj.EXPECT().SomeMethod(3, "third"),
+//	)
+//
+// The standard TestReporter most users will pass to `NewController` is a
+// `*testing.T` from the context of the test. Note that this will use the
+// standard `t.Error` and `t.Fatal` methods to report what happened in the test.
+// In some cases this can leave your testing package in a weird state if global
+// state is used since `t.Fatal` is like calling panic in the middle of a
+// function. In these cases it is recommended that you pass in your own
+// `TestReporter`.
+package gomock
diff --git a/vendor/github.com/golang/mock/gomock/matchers.go b/vendor/go.uber.org/mock/gomock/matchers.go
similarity index 91%
rename from vendor/github.com/golang/mock/gomock/matchers.go
rename to vendor/go.uber.org/mock/gomock/matchers.go
index 2822fb2c..6d5eff4f 100644
--- a/vendor/github.com/golang/mock/gomock/matchers.go
+++ b/vendor/go.uber.org/mock/gomock/matchers.go
@@ -283,8 +283,9 @@ func Any() Matcher { return anyMatcher{} }
 // Eq returns a matcher that matches on equality.
 //
 // Example usage:
-//   Eq(5).Matches(5) // returns true
-//   Eq(5).Matches(4) // returns false
+//
+//	Eq(5).Matches(5) // returns true
+//	Eq(5).Matches(4) // returns false
 func Eq(x interface{}) Matcher { return eqMatcher{x} }
 
 // Len returns a matcher that matches on length. This matcher returns false if
@@ -296,17 +297,19 @@ func Len(i int) Matcher {
 // Nil returns a matcher that matches if the received value is nil.
 //
 // Example usage:
-//   var x *bytes.Buffer
-//   Nil().Matches(x) // returns true
-//   x = &bytes.Buffer{}
-//   Nil().Matches(x) // returns false
+//
+//	var x *bytes.Buffer
+//	Nil().Matches(x) // returns true
+//	x = &bytes.Buffer{}
+//	Nil().Matches(x) // returns false
 func Nil() Matcher { return nilMatcher{} }
 
 // Not reverses the results of its given child matcher.
 //
 // Example usage:
-//   Not(Eq(5)).Matches(4) // returns true
-//   Not(Eq(5)).Matches(5) // returns false
+//
+//	Not(Eq(5)).Matches(4) // returns true
+//	Not(Eq(5)).Matches(5) // returns false
 func Not(x interface{}) Matcher {
 	if m, ok := x.(Matcher); ok {
 		return notMatcher{m}
@@ -318,12 +321,13 @@ func Not(x interface{}) Matcher {
 // function is assignable to the type of the parameter to this function.
 //
 // Example usage:
-//   var s fmt.Stringer = &bytes.Buffer{}
-//   AssignableToTypeOf(s).Matches(time.Second) // returns true
-//   AssignableToTypeOf(s).Matches(99) // returns false
 //
-//   var ctx = reflect.TypeOf((*context.Context)(nil)).Elem()
-//   AssignableToTypeOf(ctx).Matches(context.Background()) // returns true
+//	var s fmt.Stringer = &bytes.Buffer{}
+//	AssignableToTypeOf(s).Matches(time.Second) // returns true
+//	AssignableToTypeOf(s).Matches(99) // returns false
+//
+//	var ctx = reflect.TypeOf((*context.Context)(nil)).Elem()
+//	AssignableToTypeOf(ctx).Matches(context.Background()) // returns true
 func AssignableToTypeOf(x interface{}) Matcher {
 	if xt, ok := x.(reflect.Type); ok {
 		return assignableToTypeOfMatcher{xt}
@@ -334,8 +338,9 @@ func AssignableToTypeOf(x interface{}) Matcher {
 // InAnyOrder is a Matcher that returns true for collections of the same elements ignoring the order.
 //
 // Example usage:
-//   InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 3, 2}) // returns true
-//   InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 2}) // returns false
+//
+//	InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 3, 2}) // returns true
+//	InAnyOrder([]int{1, 2, 3}).Matches([]int{1, 2}) // returns false
 func InAnyOrder(x interface{}) Matcher {
 	return inAnyOrderMatcher{x}
 }
diff --git a/vendor/go.uber.org/mock/mockgen/generic_go118.go b/vendor/go.uber.org/mock/mockgen/generic_go118.go
new file mode 100644
index 00000000..917a15e8
--- /dev/null
+++ b/vendor/go.uber.org/mock/mockgen/generic_go118.go
@@ -0,0 +1,88 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+//go:build go1.18
+// +build go1.18
+
+package main
+
+import (
+	"go/ast"
+	"strings"
+
+	"go.uber.org/mock/mockgen/model"
+)
+
+func getTypeSpecTypeParams(ts *ast.TypeSpec) []*ast.Field {
+	if ts == nil || ts.TypeParams == nil {
+		return nil
+	}
+	return ts.TypeParams.List
+}
+
+func (p *fileParser) parseGenericType(pkg string, typ ast.Expr, tps map[string]bool) (model.Type, error) {
+	switch v := typ.(type) {
+	case *ast.IndexExpr:
+		m, err := p.parseType(pkg, v.X, tps)
+		if err != nil {
+			return nil, err
+		}
+		nm, ok := m.(*model.NamedType)
+		if !ok {
+			return m, nil
+		}
+		t, err := p.parseType(pkg, v.Index, tps)
+		if err != nil {
+			return nil, err
+		}
+		nm.TypeParams = &model.TypeParametersType{TypeParameters: []model.Type{t}}
+		return m, nil
+	case *ast.IndexListExpr:
+		m, err := p.parseType(pkg, v.X, tps)
+		if err != nil {
+			return nil, err
+		}
+		nm, ok := m.(*model.NamedType)
+		if !ok {
+			return m, nil
+		}
+		var ts []model.Type
+		for _, expr := range v.Indices {
+			t, err := p.parseType(pkg, expr, tps)
+			if err != nil {
+				return nil, err
+			}
+			ts = append(ts, t)
+		}
+		nm.TypeParams = &model.TypeParametersType{TypeParameters: ts}
+		return m, nil
+	}
+	return nil, nil
+}
+
+func getIdentTypeParams(decl interface{}) string {
+	if decl == nil {
+		return ""
+	}
+	ts, ok := decl.(*ast.TypeSpec)
+	if !ok {
+		return ""
+	}
+	if ts.TypeParams == nil || len(ts.TypeParams.List) == 0 {
+		return ""
+	}
+	var sb strings.Builder
+	sb.WriteString("[")
+	for i, v := range ts.TypeParams.List {
+		if i != 0 {
+			sb.WriteString(", ")
+		}
+		sb.WriteString(v.Names[0].Name)
+	}
+	sb.WriteString("]")
+	return sb.String()
+}
diff --git a/vendor/github.com/golang/mock/mockgen/version.1.11.go b/vendor/go.uber.org/mock/mockgen/generic_notgo118.go
similarity index 61%
rename from vendor/github.com/golang/mock/mockgen/version.1.11.go
rename to vendor/go.uber.org/mock/mockgen/generic_notgo118.go
index e6b25db2..b608438c 100644
--- a/vendor/github.com/golang/mock/mockgen/version.1.11.go
+++ b/vendor/go.uber.org/mock/mockgen/generic_notgo118.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC
+// Copyright 2022 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -12,15 +12,25 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// +build !go1.12
+//go:build !go1.18
+// +build !go1.18
 
 package main
 
 import (
-	"log"
+	"go/ast"
+
+	"go.uber.org/mock/mockgen/model"
 )
 
-func printModuleVersion() {
-	log.Printf("No version information is available for Mockgen compiled with " +
-		"version 1.11")
+func getTypeSpecTypeParams(ts *ast.TypeSpec) []*ast.Field {
+	return nil
+}
+
+func (p *fileParser) parseGenericType(pkg string, typ ast.Expr, tps map[string]bool) (model.Type, error) {
+	return nil, nil
+}
+
+func getIdentTypeParams(decl interface{}) string {
+	return ""
 }
diff --git a/vendor/github.com/golang/mock/mockgen/mockgen.go b/vendor/go.uber.org/mock/mockgen/mockgen.go
similarity index 76%
rename from vendor/github.com/golang/mock/mockgen/mockgen.go
rename to vendor/go.uber.org/mock/mockgen/mockgen.go
index 50487070..12b01914 100644
--- a/vendor/github.com/golang/mock/mockgen/mockgen.go
+++ b/vendor/go.uber.org/mock/mockgen/mockgen.go
@@ -21,6 +21,7 @@ package main
 import (
 	"bytes"
 	"encoding/json"
+	"errors"
 	"flag"
 	"fmt"
 	"go/token"
@@ -36,14 +37,14 @@ import (
 	"strings"
 	"unicode"
 
-	"github.com/golang/mock/mockgen/model"
+	"go.uber.org/mock/mockgen/model"
 
 	"golang.org/x/mod/modfile"
 	toolsimports "golang.org/x/tools/imports"
 )
 
 const (
-	gomockImportPath = "github.com/golang/mock/gomock"
+	gomockImportPath = "go.uber.org/mock/gomock"
 )
 
 var (
@@ -60,6 +61,7 @@ var (
 	selfPackage     = flag.String("self_package", "", "The full package import path for the generated code. The purpose of this flag is to prevent import cycles in the generated code by trying to include its own package. This can happen if the mock's package is set to one of its inputs (usually the main one) and the output is stdio so mockgen cannot detect the final output package. Setting this flag will then tell mockgen which import to exclude.")
 	writePkgComment = flag.Bool("write_package_comment", true, "Writes package documentation comment (godoc) if true.")
 	copyrightFile   = flag.String("copyright_file", "", "Copyright file used to add copyright header")
+	typed           = flag.Bool("typed", false, "Generate Type-safe 'Return', 'Do', 'DoAndReturn' function")
 
 	debugParser = flag.Bool("debug_parser", false, "Print out parser results only.")
 	showVersion = flag.Bool("version", false, "Print version.")
@@ -107,19 +109,6 @@ func main() {
 		return
 	}
 
-	dst := os.Stdout
-	if len(*destination) > 0 {
-		if err := os.MkdirAll(filepath.Dir(*destination), os.ModePerm); err != nil {
-			log.Fatalf("Unable to create directory: %v", err)
-		}
-		f, err := os.Create(*destination)
-		if err != nil {
-			log.Fatalf("Failed opening destination file: %v", err)
-		}
-		defer f.Close()
-		dst = f
-	}
-
 	outputPackageName := *packageOut
 	if outputPackageName == "" {
 		// pkg.Name in reflect mode is the base name of the import path,
@@ -171,7 +160,27 @@ func main() {
 	if err := g.Generate(pkg, outputPackageName, outputPackagePath); err != nil {
 		log.Fatalf("Failed generating mock: %v", err)
 	}
-	if _, err := dst.Write(g.Output()); err != nil {
+	output := g.Output()
+	dst := os.Stdout
+	if len(*destination) > 0 {
+		if err := os.MkdirAll(filepath.Dir(*destination), os.ModePerm); err != nil {
+			log.Fatalf("Unable to create directory: %v", err)
+		}
+		existing, err := ioutil.ReadFile(*destination)
+		if err != nil && !errors.Is(err, os.ErrNotExist) {
+			log.Fatalf("Failed reading pre-exiting destination file: %v", err)
+		}
+		if len(existing) == len(output) && bytes.Compare(existing, output) == 0 {
+			return
+		}
+		f, err := os.Create(*destination)
+		if err != nil {
+			log.Fatalf("Failed opening destination file: %v", err)
+		}
+		defer f.Close()
+		dst = f
+	}
+	if _, err := dst.Write(output); err != nil {
 		log.Fatalf("Failed writing to destination: %v", err)
 	}
 }
@@ -371,32 +380,58 @@ func (g *generator) mockName(typeName string) string {
 	return "Mock" + typeName
 }
 
+// formattedTypeParams returns a long and short form of type param info used for
+// printing. If analyzing a interface with type param [I any, O any] the result
+// will be:
+// "[I any, O any]", "[I, O]"
+func (g *generator) formattedTypeParams(it *model.Interface, pkgOverride string) (string, string) {
+	if len(it.TypeParams) == 0 {
+		return "", ""
+	}
+	var long, short strings.Builder
+	long.WriteString("[")
+	short.WriteString("[")
+	for i, v := range it.TypeParams {
+		if i != 0 {
+			long.WriteString(", ")
+			short.WriteString(", ")
+		}
+		long.WriteString(v.Name)
+		short.WriteString(v.Name)
+		long.WriteString(fmt.Sprintf(" %s", v.Type.String(g.packageMap, pkgOverride)))
+	}
+	long.WriteString("]")
+	short.WriteString("]")
+	return long.String(), short.String()
+}
+
 func (g *generator) GenerateMockInterface(intf *model.Interface, outputPackagePath string) error {
 	mockType := g.mockName(intf.Name)
+	longTp, shortTp := g.formattedTypeParams(intf, outputPackagePath)
 
 	g.p("")
 	g.p("// %v is a mock of %v interface.", mockType, intf.Name)
-	g.p("type %v struct {", mockType)
+	g.p("type %v%v struct {", mockType, longTp)
 	g.in()
 	g.p("ctrl     *gomock.Controller")
-	g.p("recorder *%vMockRecorder", mockType)
+	g.p("recorder *%vMockRecorder%v", mockType, shortTp)
 	g.out()
 	g.p("}")
 	g.p("")
 
 	g.p("// %vMockRecorder is the mock recorder for %v.", mockType, mockType)
-	g.p("type %vMockRecorder struct {", mockType)
+	g.p("type %vMockRecorder%v struct {", mockType, longTp)
 	g.in()
-	g.p("mock *%v", mockType)
+	g.p("mock *%v%v", mockType, shortTp)
 	g.out()
 	g.p("}")
 	g.p("")
 
 	g.p("// New%v creates a new mock instance.", mockType)
-	g.p("func New%v(ctrl *gomock.Controller) *%v {", mockType, mockType)
+	g.p("func New%v%v(ctrl *gomock.Controller) *%v%v {", mockType, longTp, mockType, shortTp)
 	g.in()
-	g.p("mock := &%v{ctrl: ctrl}", mockType)
-	g.p("mock.recorder = &%vMockRecorder{mock}", mockType)
+	g.p("mock := &%v%v{ctrl: ctrl}", mockType, shortTp)
+	g.p("mock.recorder = &%vMockRecorder%v{mock}", mockType, shortTp)
 	g.p("return mock")
 	g.out()
 	g.p("}")
@@ -404,13 +439,13 @@ func (g *generator) GenerateMockInterface(intf *model.Interface, outputPackagePa
 
 	// XXX: possible name collision here if someone has EXPECT in their interface.
 	g.p("// EXPECT returns an object that allows the caller to indicate expected use.")
-	g.p("func (m *%v) EXPECT() *%vMockRecorder {", mockType, mockType)
+	g.p("func (m *%v%v) EXPECT() *%vMockRecorder%v {", mockType, shortTp, mockType, shortTp)
 	g.in()
 	g.p("return m.recorder")
 	g.out()
 	g.p("}")
 
-	g.GenerateMockMethods(mockType, intf, outputPackagePath)
+	g.GenerateMockMethods(mockType, intf, outputPackagePath, longTp, shortTp, *typed)
 
 	return nil
 }
@@ -421,13 +456,17 @@ func (b byMethodName) Len() int           { return len(b) }
 func (b byMethodName) Swap(i, j int)      { b[i], b[j] = b[j], b[i] }
 func (b byMethodName) Less(i, j int) bool { return b[i].Name < b[j].Name }
 
-func (g *generator) GenerateMockMethods(mockType string, intf *model.Interface, pkgOverride string) {
+func (g *generator) GenerateMockMethods(mockType string, intf *model.Interface, pkgOverride, longTp, shortTp string, typed bool) {
 	sort.Sort(byMethodName(intf.Methods))
 	for _, m := range intf.Methods {
 		g.p("")
-		_ = g.GenerateMockMethod(mockType, m, pkgOverride)
+		_ = g.GenerateMockMethod(mockType, m, pkgOverride, shortTp)
 		g.p("")
-		_ = g.GenerateMockRecorderMethod(mockType, m)
+		_ = g.GenerateMockRecorderMethod(intf, mockType, m, shortTp, typed)
+		if typed {
+			g.p("")
+			_ = g.GenerateMockReturnCallMethod(intf, m, pkgOverride, longTp, shortTp)
+		}
 	}
 }
 
@@ -446,9 +485,9 @@ func makeArgString(argNames, argTypes []string) string {
 
 // GenerateMockMethod generates a mock method implementation.
 // If non-empty, pkgOverride is the package in which unqualified types reside.
-func (g *generator) GenerateMockMethod(mockType string, m *model.Method, pkgOverride string) error {
-	argNames := g.getArgNames(m)
-	argTypes := g.getArgTypes(m, pkgOverride)
+func (g *generator) GenerateMockMethod(mockType string, m *model.Method, pkgOverride, shortTp string) error {
+	argNames := g.getArgNames(m, true /* in */)
+	argTypes := g.getArgTypes(m, pkgOverride, true /* in */)
 	argString := makeArgString(argNames, argTypes)
 
 	rets := make([]string, len(m.Out))
@@ -467,7 +506,7 @@ func (g *generator) GenerateMockMethod(mockType string, m *model.Method, pkgOver
 	idRecv := ia.allocateIdentifier("m")
 
 	g.p("// %v mocks base method.", m.Name)
-	g.p("func (%v *%v) %v(%v)%v {", idRecv, mockType, m.Name, argString, retString)
+	g.p("func (%v *%v%v) %v(%v)%v {", idRecv, mockType, shortTp, m.Name, argString, retString)
 	g.in()
 	g.p("%s.ctrl.T.Helper()", idRecv)
 
@@ -511,8 +550,8 @@ func (g *generator) GenerateMockMethod(mockType string, m *model.Method, pkgOver
 	return nil
 }
 
-func (g *generator) GenerateMockRecorderMethod(mockType string, m *model.Method) error {
-	argNames := g.getArgNames(m)
+func (g *generator) GenerateMockRecorderMethod(intf *model.Interface, mockType string, m *model.Method, shortTp string, typed bool) error {
+	argNames := g.getArgNames(m, true)
 
 	var argString string
 	if m.Variadic == nil {
@@ -535,7 +574,12 @@ func (g *generator) GenerateMockRecorderMethod(mockType string, m *model.Method)
 	idRecv := ia.allocateIdentifier("mr")
 
 	g.p("// %v indicates an expected call of %v.", m.Name, m.Name)
-	g.p("func (%s *%vMockRecorder) %v(%v) *gomock.Call {", idRecv, mockType, m.Name, argString)
+	if typed {
+		g.p("func (%s *%vMockRecorder%v) %v(%v) *%s%sCall%s {", idRecv, mockType, shortTp, m.Name, argString, intf.Name, m.Name, shortTp)
+	} else {
+		g.p("func (%s *%vMockRecorder%v) %v(%v) *gomock.Call {", idRecv, mockType, shortTp, m.Name, argString)
+	}
+
 	g.in()
 	g.p("%s.mock.ctrl.T.Helper()", idRecv)
 
@@ -558,35 +602,114 @@ func (g *generator) GenerateMockRecorderMethod(mockType string, m *model.Method)
 			callArgs = ", " + idVarArgs + "..."
 		}
 	}
-	g.p(`return %s.mock.ctrl.RecordCallWithMethodType(%s.mock, "%s", reflect.TypeOf((*%s)(nil).%s)%s)`, idRecv, idRecv, m.Name, mockType, m.Name, callArgs)
+	if typed {
+		g.p(`call := %s.mock.ctrl.RecordCallWithMethodType(%s.mock, "%s", reflect.TypeOf((*%s%s)(nil).%s)%s)`, idRecv, idRecv, m.Name, mockType, shortTp, m.Name, callArgs)
+		g.p(`return &%s%sCall%s{Call: call}`, intf.Name, m.Name, shortTp)
+	} else {
+		g.p(`return %s.mock.ctrl.RecordCallWithMethodType(%s.mock, "%s", reflect.TypeOf((*%s%s)(nil).%s)%s)`, idRecv, idRecv, m.Name, mockType, shortTp, m.Name, callArgs)
+	}
+
+	g.out()
+	g.p("}")
+	return nil
+}
+
+func (g *generator) GenerateMockReturnCallMethod(intf *model.Interface, m *model.Method, pkgOverride, longTp, shortTp string) error {
+	argNames := g.getArgNames(m, true /* in */)
+	retNames := g.getArgNames(m, false /* out */)
+	argTypes := g.getArgTypes(m, pkgOverride, true /* in */)
+	retTypes := g.getArgTypes(m, pkgOverride, false /* out */)
+	argString := strings.Join(argTypes, ", ")
+
+	rets := make([]string, len(m.Out))
+	for i, p := range m.Out {
+		rets[i] = p.Type.String(g.packageMap, pkgOverride)
+	}
+
+	var retString string
+	switch {
+	case len(rets) == 1:
+		retString = " " + rets[0]
+	case len(rets) > 1:
+		retString = " (" + strings.Join(rets, ", ") + ")"
+	}
+
+	ia := newIdentifierAllocator(argNames)
+	idRecv := ia.allocateIdentifier("c")
+
+	recvStructName := intf.Name + m.Name
+
+	g.p("// %s%sCall wrap *gomock.Call", intf.Name, m.Name)
+	g.p("type %s%sCall%s struct{", intf.Name, m.Name, longTp)
+	g.in()
+	g.p("*gomock.Call")
+	g.out()
+	g.p("}")
+
+	g.p("// Return rewrite *gomock.Call.Return")
+	g.p("func (%s *%sCall%s) Return(%v) *%sCall%s {", idRecv, recvStructName, shortTp, makeArgString(retNames, retTypes), recvStructName, shortTp)
+	g.in()
+	var retArgs string
+	if len(retNames) > 0 {
+		retArgs = strings.Join(retNames, ", ")
+	}
+	g.p(`%s.Call =  %v.Call.Return(%v)`, idRecv, idRecv, retArgs)
+	g.p("return %s", idRecv)
+	g.out()
+	g.p("}")
+
+	g.p("// Do rewrite *gomock.Call.Do")
+	g.p("func (%s *%sCall%s) Do(f func(%v)%v) *%sCall%s {", idRecv, recvStructName, shortTp, argString, retString, recvStructName, shortTp)
+	g.in()
+	g.p(`%s.Call = %v.Call.Do(f)`, idRecv, idRecv)
+	g.p("return %s", idRecv)
+	g.out()
+	g.p("}")
 
+	g.p("// DoAndReturn rewrite *gomock.Call.DoAndReturn")
+	g.p("func (%s *%sCall%s) DoAndReturn(f func(%v)%v) *%sCall%s {", idRecv, recvStructName, shortTp, argString, retString, recvStructName, shortTp)
+	g.in()
+	g.p(`%s.Call = %v.Call.DoAndReturn(f)`, idRecv, idRecv)
+	g.p("return %s", idRecv)
 	g.out()
 	g.p("}")
 	return nil
 }
 
-func (g *generator) getArgNames(m *model.Method) []string {
-	argNames := make([]string, len(m.In))
-	for i, p := range m.In {
+func (g *generator) getArgNames(m *model.Method, in bool) []string {
+	var params []*model.Parameter
+	if in {
+		params = m.In
+	} else {
+		params = m.Out
+	}
+	argNames := make([]string, len(params))
+	for i, p := range params {
 		name := p.Name
 		if name == "" || name == "_" {
 			name = fmt.Sprintf("arg%d", i)
 		}
 		argNames[i] = name
 	}
-	if m.Variadic != nil {
+	if m.Variadic != nil && in {
 		name := m.Variadic.Name
 		if name == "" {
-			name = fmt.Sprintf("arg%d", len(m.In))
+			name = fmt.Sprintf("arg%d", len(params))
 		}
 		argNames = append(argNames, name)
 	}
 	return argNames
 }
 
-func (g *generator) getArgTypes(m *model.Method, pkgOverride string) []string {
-	argTypes := make([]string, len(m.In))
-	for i, p := range m.In {
+func (g *generator) getArgTypes(m *model.Method, pkgOverride string, in bool) []string {
+	var params []*model.Parameter
+	if in {
+		params = m.In
+	} else {
+		params = m.Out
+	}
+	argTypes := make([]string, len(params))
+	for i, p := range params {
 		argTypes[i] = p.Type.String(g.packageMap, pkgOverride)
 	}
 	if m.Variadic != nil {
diff --git a/vendor/github.com/golang/mock/mockgen/model/model.go b/vendor/go.uber.org/mock/mockgen/model/model.go
similarity index 90%
rename from vendor/github.com/golang/mock/mockgen/model/model.go
rename to vendor/go.uber.org/mock/mockgen/model/model.go
index 2c6a62ce..70c52feb 100644
--- a/vendor/github.com/golang/mock/mockgen/model/model.go
+++ b/vendor/go.uber.org/mock/mockgen/model/model.go
@@ -24,7 +24,7 @@ import (
 )
 
 // pkgPath is the importable path for package model
-const pkgPath = "github.com/golang/mock/mockgen/model"
+const pkgPath = "go.uber.org/mock/mockgen/model"
 
 // Package is a Go package. It may be a subset.
 type Package struct {
@@ -47,14 +47,18 @@ func (pkg *Package) Imports() map[string]bool {
 	im := make(map[string]bool)
 	for _, intf := range pkg.Interfaces {
 		intf.addImports(im)
+		for _, tp := range intf.TypeParams {
+			tp.Type.addImports(im)
+		}
 	}
 	return im
 }
 
 // Interface is a Go interface.
 type Interface struct {
-	Name    string
-	Methods []*Method
+	Name       string
+	Methods    []*Method
+	TypeParams []*Parameter
 }
 
 // Print writes the interface name and its methods.
@@ -156,7 +160,7 @@ func init() {
 	// For a non-pointer type, gob.Register will try to get package full path by
 	// calling rt.PkgPath() for a name to register. If your project has vendor
 	// directory, it is possible that PkgPath will get a path like this:
-	//     ../../../vendor/github.com/golang/mock/mockgen/model
+	//     ../../../vendor/go.uber.org/mock/mockgen/model
 	gob.RegisterName(pkgPath+".PredeclaredType", PredeclaredType(""))
 }
 
@@ -259,26 +263,28 @@ func (mt *MapType) addImports(im map[string]bool) {
 
 // NamedType is an exported type in a package.
 type NamedType struct {
-	Package string // may be empty
-	Type    string
+	Package    string // may be empty
+	Type       string
+	TypeParams *TypeParametersType
 }
 
 func (nt *NamedType) String(pm map[string]string, pkgOverride string) string {
 	if pkgOverride == nt.Package {
-		return nt.Type
+		return nt.Type + nt.TypeParams.String(pm, pkgOverride)
 	}
 	prefix := pm[nt.Package]
 	if prefix != "" {
-		return prefix + "." + nt.Type
+		return prefix + "." + nt.Type + nt.TypeParams.String(pm, pkgOverride)
 	}
 
-	return nt.Type
+	return nt.Type + nt.TypeParams.String(pm, pkgOverride)
 }
 
 func (nt *NamedType) addImports(im map[string]bool) {
 	if nt.Package != "" {
 		im[nt.Package] = true
 	}
+	nt.TypeParams.addImports(im)
 }
 
 // PointerType is a pointer to another type.
@@ -297,6 +303,36 @@ type PredeclaredType string
 func (pt PredeclaredType) String(map[string]string, string) string { return string(pt) }
 func (pt PredeclaredType) addImports(map[string]bool)              {}
 
+// TypeParametersType contains type paramters for a NamedType.
+type TypeParametersType struct {
+	TypeParameters []Type
+}
+
+func (tp *TypeParametersType) String(pm map[string]string, pkgOverride string) string {
+	if tp == nil || len(tp.TypeParameters) == 0 {
+		return ""
+	}
+	var sb strings.Builder
+	sb.WriteString("[")
+	for i, v := range tp.TypeParameters {
+		if i != 0 {
+			sb.WriteString(", ")
+		}
+		sb.WriteString(v.String(pm, pkgOverride))
+	}
+	sb.WriteString("]")
+	return sb.String()
+}
+
+func (tp *TypeParametersType) addImports(im map[string]bool) {
+	if tp == nil {
+		return
+	}
+	for _, v := range tp.TypeParameters {
+		v.addImports(im)
+	}
+}
+
 // The following code is intended to be called by the program generated by ../reflect.go.
 
 // InterfaceFromInterfaceType returns a pointer to an interface for the
diff --git a/vendor/github.com/golang/mock/mockgen/parse.go b/vendor/go.uber.org/mock/mockgen/parse.go
similarity index 73%
rename from vendor/github.com/golang/mock/mockgen/parse.go
rename to vendor/go.uber.org/mock/mockgen/parse.go
index bf6902cd..aab90660 100644
--- a/vendor/github.com/golang/mock/mockgen/parse.go
+++ b/vendor/go.uber.org/mock/mockgen/parse.go
@@ -33,7 +33,7 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/golang/mock/mockgen/model"
+	"go.uber.org/mock/mockgen/model"
 )
 
 var (
@@ -62,8 +62,8 @@ func sourceMode(source string) (*model.Package, error) {
 	p := &fileParser{
 		fileSet:            fs,
 		imports:            make(map[string]importedPackage),
-		importedInterfaces: make(map[string]map[string]*ast.InterfaceType),
-		auxInterfaces:      make(map[string]map[string]*ast.InterfaceType),
+		importedInterfaces: newInterfaceCache(),
+		auxInterfaces:      newInterfaceCache(),
 		srcDir:             srcDir,
 	}
 
@@ -127,15 +127,48 @@ func (d duplicateImport) Error() string {
 func (d duplicateImport) Path() string        { log.Fatal(d.Error()); return "" }
 func (d duplicateImport) Parser() *fileParser { log.Fatal(d.Error()); return nil }
 
-type fileParser struct {
-	fileSet            *token.FileSet
-	imports            map[string]importedPackage               // package name => imported package
-	importedInterfaces map[string]map[string]*ast.InterfaceType // package (or "") => name => interface
+type interfaceCache struct {
+	m map[string]map[string]*namedInterface
+}
+
+func newInterfaceCache() *interfaceCache {
+	return &interfaceCache{
+		m: make(map[string]map[string]*namedInterface),
+	}
+}
 
-	auxFiles      []*ast.File
-	auxInterfaces map[string]map[string]*ast.InterfaceType // package (or "") => name => interface
+func (i *interfaceCache) Set(pkg, name string, it *namedInterface) {
+	if _, ok := i.m[pkg]; !ok {
+		i.m[pkg] = make(map[string]*namedInterface)
+	}
+	i.m[pkg][name] = it
+}
+
+func (i *interfaceCache) Get(pkg, name string) *namedInterface {
+	if _, ok := i.m[pkg]; !ok {
+		return nil
+	}
+	return i.m[pkg][name]
+}
+
+func (i *interfaceCache) GetASTIface(pkg, name string) *ast.InterfaceType {
+	if _, ok := i.m[pkg]; !ok {
+		return nil
+	}
+	it, ok := i.m[pkg][name]
+	if !ok {
+		return nil
+	}
+	return it.it
+}
 
-	srcDir string
+type fileParser struct {
+	fileSet            *token.FileSet
+	imports            map[string]importedPackage // package name => imported package
+	importedInterfaces *interfaceCache
+	auxFiles           []*ast.File
+	auxInterfaces      *interfaceCache
+	srcDir             string
 }
 
 func (p *fileParser) errorf(pos token.Pos, format string, args ...interface{}) error {
@@ -168,11 +201,8 @@ func (p *fileParser) parseAuxFiles(auxFiles string) error {
 }
 
 func (p *fileParser) addAuxInterfacesFromFile(pkg string, file *ast.File) {
-	if _, ok := p.auxInterfaces[pkg]; !ok {
-		p.auxInterfaces[pkg] = make(map[string]*ast.InterfaceType)
-	}
 	for ni := range iterInterfaces(file) {
-		p.auxInterfaces[pkg][ni.name.Name] = ni.it
+		p.auxInterfaces.Set(pkg, ni.name.Name, ni)
 	}
 }
 
@@ -199,7 +229,7 @@ func (p *fileParser) parseFile(importPath string, file *ast.File) (*model.Packag
 
 	var is []*model.Interface
 	for ni := range iterInterfaces(file) {
-		i, err := p.parseInterface(ni.name.String(), importPath, ni.it)
+		i, err := p.parseInterface(ni.name.String(), importPath, ni)
 		if err != nil {
 			return nil, err
 		}
@@ -219,8 +249,8 @@ func (p *fileParser) parsePackage(path string) (*fileParser, error) {
 	newP := &fileParser{
 		fileSet:            token.NewFileSet(),
 		imports:            make(map[string]importedPackage),
-		importedInterfaces: make(map[string]map[string]*ast.InterfaceType),
-		auxInterfaces:      make(map[string]map[string]*ast.InterfaceType),
+		importedInterfaces: newInterfaceCache(),
+		auxInterfaces:      newInterfaceCache(),
 		srcDir:             p.srcDir,
 	}
 
@@ -233,11 +263,8 @@ func (p *fileParser) parsePackage(path string) (*fileParser, error) {
 
 	for _, pkg := range pkgs {
 		file := ast.MergePackageFiles(pkg, ast.FilterFuncDuplicates|ast.FilterUnassociatedComments|ast.FilterImportDuplicates)
-		if _, ok := newP.importedInterfaces[path]; !ok {
-			newP.importedInterfaces[path] = make(map[string]*ast.InterfaceType)
-		}
 		for ni := range iterInterfaces(file) {
-			newP.importedInterfaces[path][ni.name.Name] = ni.it
+			newP.importedInterfaces.Set(path, ni.name.Name, ni)
 		}
 		imports, _ := importsOfFile(file)
 		for pkgName, pkgI := range imports {
@@ -247,9 +274,20 @@ func (p *fileParser) parsePackage(path string) (*fileParser, error) {
 	return newP, nil
 }
 
-func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*model.Interface, error) {
+func (p *fileParser) parseInterface(name, pkg string, it *namedInterface) (*model.Interface, error) {
 	iface := &model.Interface{Name: name}
-	for _, field := range it.Methods.List {
+	tps := make(map[string]bool)
+
+	tp, err := p.parseFieldList(pkg, it.typeParams, tps)
+	if err != nil {
+		return nil, fmt.Errorf("unable to parse interface type parameters: %v", name)
+	}
+	iface.TypeParams = tp
+	for _, v := range tp {
+		tps[v.Name] = true
+	}
+
+	for _, field := range it.it.Methods.List {
 		switch v := field.Type.(type) {
 		case *ast.FuncType:
 			if nn := len(field.Names); nn != 1 {
@@ -259,16 +297,16 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m
 				Name: field.Names[0].String(),
 			}
 			var err error
-			m.In, m.Variadic, m.Out, err = p.parseFunc(pkg, v)
+			m.In, m.Variadic, m.Out, err = p.parseFunc(pkg, v, tps)
 			if err != nil {
 				return nil, err
 			}
 			iface.AddMethod(m)
 		case *ast.Ident:
 			// Embedded interface in this package.
-			embeddedIfaceType := p.auxInterfaces[pkg][v.String()]
+			embeddedIfaceType := p.auxInterfaces.Get(pkg, v.String())
 			if embeddedIfaceType == nil {
-				embeddedIfaceType = p.importedInterfaces[pkg][v.String()]
+				embeddedIfaceType = p.importedInterfaces.Get(pkg, v.String())
 			}
 
 			var embeddedIface *model.Interface
@@ -283,7 +321,19 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m
 				if v.String() == model.ErrorInterface.Name {
 					embeddedIface = &model.ErrorInterface
 				} else {
-					return nil, p.errorf(v.Pos(), "unknown embedded interface %s", v.String())
+					ip, err := p.parsePackage(pkg)
+					if err != nil {
+						return nil, p.errorf(v.Pos(), "could not parse package %s: %v", pkg, err)
+					}
+
+					if embeddedIfaceType = ip.importedInterfaces.Get(pkg, v.String()); embeddedIfaceType == nil {
+						return nil, p.errorf(v.Pos(), "unknown embedded interface %s.%s", pkg, v.String())
+					}
+
+					embeddedIface, err = ip.parseInterface(v.String(), pkg, embeddedIfaceType)
+					if err != nil {
+						return nil, err
+					}
 				}
 			}
 			// Copy the methods.
@@ -300,7 +350,7 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m
 
 			var embeddedIface *model.Interface
 			var err error
-			embeddedIfaceType := p.auxInterfaces[filePkg][sel]
+			embeddedIfaceType := p.auxInterfaces.Get(filePkg, sel)
 			if embeddedIfaceType != nil {
 				embeddedIface, err = p.parseInterface(sel, filePkg, embeddedIfaceType)
 				if err != nil {
@@ -320,7 +370,7 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m
 						parser: parser,
 					}
 				}
-				if embeddedIfaceType = parser.importedInterfaces[path][sel]; embeddedIfaceType == nil {
+				if embeddedIfaceType = parser.importedInterfaces.Get(path, sel); embeddedIfaceType == nil {
 					return nil, p.errorf(v.Pos(), "unknown embedded interface %s.%s", path, sel)
 				}
 				embeddedIface, err = parser.parseInterface(sel, path, embeddedIfaceType)
@@ -340,26 +390,26 @@ func (p *fileParser) parseInterface(name, pkg string, it *ast.InterfaceType) (*m
 	return iface, nil
 }
 
-func (p *fileParser) parseFunc(pkg string, f *ast.FuncType) (inParam []*model.Parameter, variadic *model.Parameter, outParam []*model.Parameter, err error) {
+func (p *fileParser) parseFunc(pkg string, f *ast.FuncType, tps map[string]bool) (inParam []*model.Parameter, variadic *model.Parameter, outParam []*model.Parameter, err error) {
 	if f.Params != nil {
 		regParams := f.Params.List
 		if isVariadic(f) {
 			n := len(regParams)
 			varParams := regParams[n-1:]
 			regParams = regParams[:n-1]
-			vp, err := p.parseFieldList(pkg, varParams)
+			vp, err := p.parseFieldList(pkg, varParams, tps)
 			if err != nil {
 				return nil, nil, nil, p.errorf(varParams[0].Pos(), "failed parsing variadic argument: %v", err)
 			}
 			variadic = vp[0]
 		}
-		inParam, err = p.parseFieldList(pkg, regParams)
+		inParam, err = p.parseFieldList(pkg, regParams, tps)
 		if err != nil {
 			return nil, nil, nil, p.errorf(f.Pos(), "failed parsing arguments: %v", err)
 		}
 	}
 	if f.Results != nil {
-		outParam, err = p.parseFieldList(pkg, f.Results.List)
+		outParam, err = p.parseFieldList(pkg, f.Results.List, tps)
 		if err != nil {
 			return nil, nil, nil, p.errorf(f.Pos(), "failed parsing returns: %v", err)
 		}
@@ -367,7 +417,7 @@ func (p *fileParser) parseFunc(pkg string, f *ast.FuncType) (inParam []*model.Pa
 	return
 }
 
-func (p *fileParser) parseFieldList(pkg string, fields []*ast.Field) ([]*model.Parameter, error) {
+func (p *fileParser) parseFieldList(pkg string, fields []*ast.Field, tps map[string]bool) ([]*model.Parameter, error) {
 	nf := 0
 	for _, f := range fields {
 		nn := len(f.Names)
@@ -382,7 +432,7 @@ func (p *fileParser) parseFieldList(pkg string, fields []*ast.Field) ([]*model.P
 	ps := make([]*model.Parameter, nf)
 	i := 0 // destination index
 	for _, f := range fields {
-		t, err := p.parseType(pkg, f.Type)
+		t, err := p.parseType(pkg, f.Type, tps)
 		if err != nil {
 			return nil, err
 		}
@@ -401,44 +451,27 @@ func (p *fileParser) parseFieldList(pkg string, fields []*ast.Field) ([]*model.P
 	return ps, nil
 }
 
-func (p *fileParser) parseType(pkg string, typ ast.Expr) (model.Type, error) {
+func (p *fileParser) parseType(pkg string, typ ast.Expr, tps map[string]bool) (model.Type, error) {
 	switch v := typ.(type) {
 	case *ast.ArrayType:
 		ln := -1
 		if v.Len != nil {
-			var value string
-			switch val := v.Len.(type) {
-			case (*ast.BasicLit):
-				value = val.Value
-			case (*ast.Ident):
-				// when the length is a const defined locally
-				value = val.Obj.Decl.(*ast.ValueSpec).Values[0].(*ast.BasicLit).Value
-			case (*ast.SelectorExpr):
-				// when the length is a const defined in an external package
-				usedPkg, err := importer.Default().Import(fmt.Sprintf("%s", val.X))
-				if err != nil {
-					return nil, p.errorf(v.Len.Pos(), "unknown package in array length: %v", err)
-				}
-				ev, err := types.Eval(token.NewFileSet(), usedPkg, token.NoPos, val.Sel.Name)
-				if err != nil {
-					return nil, p.errorf(v.Len.Pos(), "unknown constant in array length: %v", err)
-				}
-				value = ev.Value.String()
+			value, err := p.parseArrayLength(v.Len)
+			if err != nil {
+				return nil, err
 			}
-
-			x, err := strconv.Atoi(value)
+			ln, err = strconv.Atoi(value)
 			if err != nil {
 				return nil, p.errorf(v.Len.Pos(), "bad array size: %v", err)
 			}
-			ln = x
 		}
-		t, err := p.parseType(pkg, v.Elt)
+		t, err := p.parseType(pkg, v.Elt, tps)
 		if err != nil {
 			return nil, err
 		}
 		return &model.ArrayType{Len: ln, Type: t}, nil
 	case *ast.ChanType:
-		t, err := p.parseType(pkg, v.Value)
+		t, err := p.parseType(pkg, v.Value, tps)
 		if err != nil {
 			return nil, err
 		}
@@ -452,15 +485,15 @@ func (p *fileParser) parseType(pkg string, typ ast.Expr) (model.Type, error) {
 		return &model.ChanType{Dir: dir, Type: t}, nil
 	case *ast.Ellipsis:
 		// assume we're parsing a variadic argument
-		return p.parseType(pkg, v.Elt)
+		return p.parseType(pkg, v.Elt, tps)
 	case *ast.FuncType:
-		in, variadic, out, err := p.parseFunc(pkg, v)
+		in, variadic, out, err := p.parseFunc(pkg, v, tps)
 		if err != nil {
 			return nil, err
 		}
 		return &model.FuncType{In: in, Out: out, Variadic: variadic}, nil
 	case *ast.Ident:
-		if v.IsExported() {
+		if v.IsExported() && !tps[v.Name] {
 			// `pkg` may be an aliased imported pkg
 			// if so, patch the import w/ the fully qualified import
 			maybeImportedPkg, ok := p.imports[pkg]
@@ -479,11 +512,11 @@ func (p *fileParser) parseType(pkg string, typ ast.Expr) (model.Type, error) {
 		}
 		return model.PredeclaredType("interface{}"), nil
 	case *ast.MapType:
-		key, err := p.parseType(pkg, v.Key)
+		key, err := p.parseType(pkg, v.Key, tps)
 		if err != nil {
 			return nil, err
 		}
-		value, err := p.parseType(pkg, v.Value)
+		value, err := p.parseType(pkg, v.Value, tps)
 		if err != nil {
 			return nil, err
 		}
@@ -496,7 +529,7 @@ func (p *fileParser) parseType(pkg string, typ ast.Expr) (model.Type, error) {
 		}
 		return &model.NamedType{Package: pkg.Path(), Type: v.Sel.String()}, nil
 	case *ast.StarExpr:
-		t, err := p.parseType(pkg, v.X)
+		t, err := p.parseType(pkg, v.X, tps)
 		if err != nil {
 			return nil, err
 		}
@@ -507,12 +540,61 @@ func (p *fileParser) parseType(pkg string, typ ast.Expr) (model.Type, error) {
 		}
 		return model.PredeclaredType("struct{}"), nil
 	case *ast.ParenExpr:
-		return p.parseType(pkg, v.X)
+		return p.parseType(pkg, v.X, tps)
+	default:
+		mt, err := p.parseGenericType(pkg, typ, tps)
+		if err != nil {
+			return nil, err
+		}
+		if mt == nil {
+			break
+		}
+		return mt, nil
 	}
 
 	return nil, fmt.Errorf("don't know how to parse type %T", typ)
 }
 
+func (p *fileParser) parseArrayLength(expr ast.Expr) (string, error) {
+	switch val := expr.(type) {
+	case (*ast.BasicLit):
+		return val.Value, nil
+	case (*ast.Ident):
+		// when the length is a const defined locally
+		return val.Obj.Decl.(*ast.ValueSpec).Values[0].(*ast.BasicLit).Value, nil
+	case (*ast.SelectorExpr):
+		// when the length is a const defined in an external package
+		usedPkg, err := importer.Default().Import(fmt.Sprintf("%s", val.X))
+		if err != nil {
+			return "", p.errorf(expr.Pos(), "unknown package in array length: %v", err)
+		}
+		ev, err := types.Eval(token.NewFileSet(), usedPkg, token.NoPos, val.Sel.Name)
+		if err != nil {
+			return "", p.errorf(expr.Pos(), "unknown constant in array length: %v", err)
+		}
+		return ev.Value.String(), nil
+	case (*ast.ParenExpr):
+		return p.parseArrayLength(val.X)
+	case (*ast.BinaryExpr):
+		x, err := p.parseArrayLength(val.X)
+		if err != nil {
+			return "", err
+		}
+		y, err := p.parseArrayLength(val.Y)
+		if err != nil {
+			return "", err
+		}
+		biExpr := fmt.Sprintf("%s%v%s", x, val.Op, y)
+		tv, err := types.Eval(token.NewFileSet(), nil, token.NoPos, biExpr)
+		if err != nil {
+			return "", p.errorf(expr.Pos(), "invalid expression in array length: %v", err)
+		}
+		return tv.Value.String(), nil
+	default:
+		return "", p.errorf(expr.Pos(), "invalid expression in array length: %v", val)
+	}
+}
+
 // importsOfFile returns a map of package name to import path
 // of the imports in file.
 func importsOfFile(file *ast.File) (normalImports map[string]importedPackage, dotImports []string) {
@@ -575,13 +657,14 @@ func importsOfFile(file *ast.File) (normalImports map[string]importedPackage, do
 }
 
 type namedInterface struct {
-	name *ast.Ident
-	it   *ast.InterfaceType
+	name       *ast.Ident
+	it         *ast.InterfaceType
+	typeParams []*ast.Field
 }
 
 // Create an iterator over all interfaces in file.
-func iterInterfaces(file *ast.File) <-chan namedInterface {
-	ch := make(chan namedInterface)
+func iterInterfaces(file *ast.File) <-chan *namedInterface {
+	ch := make(chan *namedInterface)
 	go func() {
 		for _, decl := range file.Decls {
 			gd, ok := decl.(*ast.GenDecl)
@@ -598,7 +681,7 @@ func iterInterfaces(file *ast.File) <-chan namedInterface {
 					continue
 				}
 
-				ch <- namedInterface{ts.Name, it}
+				ch <- &namedInterface{ts.Name, it, getTypeSpecTypeParams(ts)}
 			}
 		}
 		close(ch)
diff --git a/vendor/github.com/golang/mock/mockgen/reflect.go b/vendor/go.uber.org/mock/mockgen/reflect.go
similarity index 96%
rename from vendor/github.com/golang/mock/mockgen/reflect.go
rename to vendor/go.uber.org/mock/mockgen/reflect.go
index e24efce0..bcb1319d 100644
--- a/vendor/github.com/golang/mock/mockgen/reflect.go
+++ b/vendor/go.uber.org/mock/mockgen/reflect.go
@@ -32,7 +32,7 @@ import (
 	"strings"
 	"text/template"
 
-	"github.com/golang/mock/mockgen/model"
+	"go.uber.org/mock/mockgen/model"
 )
 
 var (
@@ -169,8 +169,8 @@ func runInDir(program []byte, dir string) (*model.Package, error) {
 	if err := cmd.Run(); err != nil {
 		sErr := buf.String()
 		if strings.Contains(sErr, `cannot find package "."`) &&
-			strings.Contains(sErr, "github.com/golang/mock/mockgen/model") {
-			fmt.Fprint(os.Stderr, "Please reference the steps in the README to fix this error:\n\thttps://github.com/golang/mock#reflect-vendoring-error.")
+			strings.Contains(sErr, "go.uber.org/mock/mockgen/model") {
+			fmt.Fprint(os.Stderr, "Please reference the steps in the README to fix this error:\n\thttps://go.uber.org/mock#reflect-vendoring-error.\n")
 			return nil, err
 		}
 		return nil, err
@@ -198,7 +198,7 @@ import (
 	"path"
 	"reflect"
 
-	"github.com/golang/mock/mockgen/model"
+	"go.uber.org/mock/mockgen/model"
 
 	pkg_ {{printf "%q" .ImportPath}}
 )
diff --git a/vendor/github.com/golang/mock/mockgen/version.1.12.go b/vendor/go.uber.org/mock/mockgen/version.go
similarity index 94%
rename from vendor/github.com/golang/mock/mockgen/version.1.12.go
rename to vendor/go.uber.org/mock/mockgen/version.go
index ad121ae6..6db160ac 100644
--- a/vendor/github.com/golang/mock/mockgen/version.1.12.go
+++ b/vendor/go.uber.org/mock/mockgen/version.go
@@ -1,4 +1,4 @@
-// Copyright 2019 Google LLC
+// Copyright 2022 Google LLC
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -11,9 +11,6 @@
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 // See the License for the specific language governing permissions and
 // limitations under the License.
-//
-
-// +build go1.12
 
 package main
 
@@ -31,5 +28,4 @@ func printModuleVersion() {
 			"GO111MODULE=on when running 'go get' in order to use specific " +
 			"version of the binary.")
 	}
-
 }
diff --git a/vendor/modules.txt b/vendor/modules.txt
index a8eaf16a..d329fdec 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -148,11 +148,6 @@ github.com/gobwas/glob/util/strings
 ## explicit; go 1.15
 github.com/gogo/protobuf/proto
 github.com/gogo/protobuf/sortkeys
-# github.com/golang/mock v1.6.0
-## explicit; go 1.11
-github.com/golang/mock/gomock
-github.com/golang/mock/mockgen
-github.com/golang/mock/mockgen/model
 # github.com/golang/protobuf v1.5.2
 ## explicit; go 1.9
 github.com/golang/protobuf/proto
@@ -378,6 +373,11 @@ github.com/stretchr/testify/require
 # github.com/subosito/gotenv v1.2.0
 ## explicit
 github.com/subosito/gotenv
+# go.uber.org/mock v0.2.0
+## explicit; go 1.19
+go.uber.org/mock/gomock
+go.uber.org/mock/mockgen
+go.uber.org/mock/mockgen/model
 # golang.org/x/crypto v0.2.0
 ## explicit; go 1.17
 golang.org/x/crypto/blowfish


Test patch:
diff --git a/commands/apps_dev_test.go b/commands/apps_dev_test.go
index ac25ce3e..2e5b2da6 100644
--- a/commands/apps_dev_test.go
+++ b/commands/apps_dev_test.go
@@ -9,9 +9,9 @@ import (
 	"github.com/digitalocean/doctl"
 	"github.com/digitalocean/doctl/internal/apps/builder"
 	"github.com/digitalocean/godo"
-	"github.com/golang/mock/gomock"
 	"github.com/google/uuid"
 	"github.com/stretchr/testify/require"
+	"go.uber.org/mock/gomock"
 )
 
 func TestRunAppsDevBuild(t *testing.T) {
diff --git a/commands/auth_test.go b/commands/auth_test.go
index 83479ef1..fbd890bd 100644
--- a/commands/auth_test.go
+++ b/commands/auth_test.go
@@ -25,9 +25,9 @@ import (
 
 	"github.com/digitalocean/doctl"
 	"github.com/digitalocean/doctl/do"
-	"github.com/golang/mock/gomock"
 	"github.com/spf13/viper"
 	"github.com/stretchr/testify/assert"
+	"go.uber.org/mock/gomock"
 	yaml "gopkg.in/yaml.v2"
 )
 
diff --git a/commands/commands_test.go b/commands/commands_test.go
index 18f1beec..3ec8b4da 100644
--- a/commands/commands_test.go
+++ b/commands/commands_test.go
@@ -23,10 +23,10 @@ import (
 	domocks "github.com/digitalocean/doctl/do/mocks"
 	"github.com/digitalocean/doctl/internal/apps/builder"
 	"github.com/digitalocean/godo"
-	"github.com/golang/mock/gomock"
 	"github.com/spf13/cobra"
 	"github.com/spf13/viper"
 	"github.com/stretchr/testify/assert"
+	"go.uber.org/mock/gomock"
 )
 
 var (
diff --git a/commands/databases_test.go b/commands/databases_test.go
index 9a8c6523..a2970c7a 100644
--- a/commands/databases_test.go
+++ b/commands/databases_test.go
@@ -8,8 +8,8 @@ import (
 	"github.com/digitalocean/doctl"
 	"github.com/digitalocean/doctl/do"
 	"github.com/digitalocean/godo"
-	"github.com/golang/mock/gomock"
 	"github.com/stretchr/testify/assert"
+	"go.uber.org/mock/gomock"
 )
 
 var (
diff --git a/commands/registry_test.go b/commands/registry_test.go
index e7a34d47..b3cf7e28 100644
--- a/commands/registry_test.go
+++ b/commands/registry_test.go
@@ -26,8 +26,8 @@ import (
 	"github.com/digitalocean/doctl/do"
 	"github.com/digitalocean/doctl/do/mocks"
 	"github.com/digitalocean/godo"
-	"github.com/golang/mock/gomock"
 	"github.com/stretchr/testify/assert"
+	"go.uber.org/mock/gomock"
 	k8sapiv1 "k8s.io/api/core/v1"
 	k8sscheme "k8s.io/client-go/kubernetes/scheme"
 )
diff --git a/do/account_test.go b/do/account_test.go
index 5743c4db..3b3a3cc4 100644
--- a/do/account_test.go
+++ b/do/account_test.go
@@ -20,8 +20,8 @@ import (
 
 	"github.com/digitalocean/doctl/do"
 	"github.com/digitalocean/godo"
-	"github.com/golang/mock/gomock"
 	"github.com/stretchr/testify/assert"
+	"go.uber.org/mock/gomock"
 )
 
 // MockAccountService is a mock for AccountService interface
diff --git a/do/balance_test.go b/do/balance_test.go
index 340a9a70..88ffaf0d 100644
--- a/do/balance_test.go
+++ b/do/balance_test.go
@@ -20,8 +20,8 @@ import (
 
 	"github.com/digitalocean/doctl/do"
 	"github.com/digitalocean/godo"
-	"github.com/golang/mock/gomock"
 	"github.com/stretchr/testify/assert"
+	"go.uber.org/mock/gomock"
 )
 
 // MockBalanceService is a mock for BalanceService interface
diff --git a/internal/apps/builder/cnb_test.go b/internal/apps/builder/cnb_test.go
index afcc2d56..684284ce 100644
--- a/internal/apps/builder/cnb_test.go
+++ b/internal/apps/builder/cnb_test.go
@@ -17,9 +17,9 @@ import (
 	"github.com/docker/docker/api/types/container"
 	"github.com/docker/docker/api/types/filters"
 	"github.com/docker/docker/pkg/stdcopy"
-	"github.com/golang/mock/gomock"
 	"github.com/kballard/go-shellquote"
 	"github.com/stretchr/testify/require"
+	"go.uber.org/mock/gomock"
 )
 
 func TestCNBComponentBuild(t *testing.T) {
diff --git a/internal/apps/builder/docker_test.go b/internal/apps/builder/docker_test.go
index ae44c664..79ba2f8f 100644
--- a/internal/apps/builder/docker_test.go
+++ b/internal/apps/builder/docker_test.go
@@ -17,9 +17,9 @@ import (
 	"github.com/digitalocean/doctl/commands/charm/text"
 	"github.com/digitalocean/godo"
 	"github.com/docker/docker/api/types"
-	"github.com/golang/mock/gomock"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
+	"go.uber.org/mock/gomock"
 )
 
 func TestDockerComponentBuild_validation(t *testing.T) {