diff --git a/go.mod b/go.mod index 36a7804eba..4b2b91ed0d 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,6 @@ require ( github.com/blang/semver/v4 v4.0.0 github.com/go-bindata/go-bindata/v3 v3.1.3 github.com/go-logr/logr v1.4.3 - github.com/golang/mock v1.6.0 github.com/googleapis/gnostic v0.5.5 github.com/grpc-ecosystem/grpc-health-probe v0.4.41 github.com/maxbrunsfeld/counterfeiter/v6 v6.12.0 @@ -19,6 +18,7 @@ require ( github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.10.1 github.com/stretchr/testify v1.11.1 + go.uber.org/mock v0.6.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.5.1 google.golang.org/protobuf v1.36.10 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index f684054b70..f75b7c9841 100644 --- a/go.sum +++ b/go.sum @@ -624,7 +624,6 @@ github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/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= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo= @@ -701,6 +700,8 @@ go.podman.io/storage v1.61.0/go.mod h1:A3UBK0XypjNZ6pghRhuxg62+2NIm5lcUGv/7XyMhM go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= @@ -738,7 +739,6 @@ golang.org/x/lint v0.0.0-20241112194109-818c5a804067/go.mod h1:3xt1FjdF8hUf6vQPI golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= @@ -767,7 +767,6 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 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-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= @@ -788,7 +787,6 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/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-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= @@ -816,8 +814,6 @@ golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/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-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -880,7 +876,6 @@ golang.org/x/tools v0.0.0-20200115044656-831fdb1e1868/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= diff --git a/staging/api/crds/zz_defs.go b/staging/api/crds/zz_defs.go index 06bb23be58..afc6aeb122 100644 --- a/staging/api/crds/zz_defs.go +++ b/staging/api/crds/zz_defs.go @@ -1,6 +1,6 @@ // Code generated by go-bindata. (@generated) DO NOT EDIT. -//Package crds generated by go-bindata.// sources: +// Package crds generated by go-bindata.// sources: // operators.coreos.com_catalogsources.yaml // operators.coreos.com_clusterserviceversions.yaml // operators.coreos.com_installplans.yaml diff --git a/staging/api/tools.go b/staging/api/tools.go index a3fba99c66..7a4a119193 100644 --- a/staging/api/tools.go +++ b/staging/api/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools package tools diff --git a/staging/operator-lifecycle-manager/go.mod b/staging/operator-lifecycle-manager/go.mod index 594e6272aa..e22e8df38c 100644 --- a/staging/operator-lifecycle-manager/go.mod +++ b/staging/operator-lifecycle-manager/go.mod @@ -33,6 +33,7 @@ require ( github.com/spf13/pflag v1.0.10 github.com/stretchr/testify v1.11.1 go.podman.io/image/v5 v5.38.0 + go.uber.org/mock v0.6.0 golang.org/x/net v0.46.0 golang.org/x/sync v0.18.0 golang.org/x/time v0.14.0 diff --git a/staging/operator-lifecycle-manager/go.sum b/staging/operator-lifecycle-manager/go.sum index d37e65387b..ef3276ab02 100644 --- a/staging/operator-lifecycle-manager/go.sum +++ b/staging/operator-lifecycle-manager/go.sum @@ -674,6 +674,8 @@ go.podman.io/storage v1.61.0 h1:5hD/oyRYt1f1gxgvect+8syZBQhGhV28dCw2+CZpx0Q= go.podman.io/storage v1.61.0/go.mod h1:A3UBK0XypjNZ6pghRhuxg62+2NIm5lcUGv/7XyMhMUI= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= diff --git a/staging/operator-lifecycle-manager/pkg/lib/operatorclient/client.go b/staging/operator-lifecycle-manager/pkg/lib/operatorclient/client.go index 30593acfa2..8fecc1f1cf 100644 --- a/staging/operator-lifecycle-manager/pkg/lib/operatorclient/client.go +++ b/staging/operator-lifecycle-manager/pkg/lib/operatorclient/client.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/golang/mock/mockgen -source client.go -destination operatorclientmocks/mock_client.go -package operatorclientmocks +//go:generate go run go.uber.org/mock/mockgen -source client.go -destination operatorclientmocks/mock_client.go -package operatorclientmocks package operatorclient import ( diff --git a/staging/operator-lifecycle-manager/pkg/lib/operatorclient/operatorclientmocks/mock_client.go b/staging/operator-lifecycle-manager/pkg/lib/operatorclient/operatorclientmocks/mock_client.go index 4a7c3bc726..b757677546 100644 --- a/staging/operator-lifecycle-manager/pkg/lib/operatorclient/operatorclientmocks/mock_client.go +++ b/staging/operator-lifecycle-manager/pkg/lib/operatorclient/operatorclientmocks/mock_client.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: client.go +// +// Generated by this command: +// +// mockgen -source client.go -destination operatorclientmocks/mock_client.go -package operatorclientmocks +// // Package operatorclientmocks is a generated GoMock package. package operatorclientmocks @@ -7,8 +12,8 @@ package operatorclientmocks import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" operatorclient "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient" + gomock "go.uber.org/mock/gomock" v1 "k8s.io/api/apps/v1" v10 "k8s.io/api/core/v1" v11 "k8s.io/api/networking/v1" @@ -28,6 +33,7 @@ import ( type MockClientInterface struct { ctrl *gomock.Controller recorder *MockClientInterfaceMockRecorder + isgomock struct{} } // MockClientInterfaceMockRecorder is the mock recorder for MockClientInterface. @@ -85,7 +91,7 @@ func (m *MockClientInterface) ApplyClusterRoleBinding(applyConfig *v15.ClusterRo } // ApplyClusterRoleBinding indicates an expected call of ApplyClusterRoleBinding. -func (mr *MockClientInterfaceMockRecorder) ApplyClusterRoleBinding(applyConfig, applyOptions interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) ApplyClusterRoleBinding(applyConfig, applyOptions any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyClusterRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).ApplyClusterRoleBinding), applyConfig, applyOptions) } @@ -100,7 +106,7 @@ func (m *MockClientInterface) ApplyRoleBinding(applyConfig *v15.RoleBindingApply } // ApplyRoleBinding indicates an expected call of ApplyRoleBinding. -func (mr *MockClientInterfaceMockRecorder) ApplyRoleBinding(applyConfig, applyOptions interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) ApplyRoleBinding(applyConfig, applyOptions any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).ApplyRoleBinding), applyConfig, applyOptions) } @@ -115,13 +121,13 @@ func (m *MockClientInterface) ApplyService(arg0 *v14.ServiceApplyConfiguration, } // ApplyService indicates an expected call of ApplyService. -func (mr *MockClientInterfaceMockRecorder) ApplyService(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) ApplyService(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyService", reflect.TypeOf((*MockClientInterface)(nil).ApplyService), arg0, arg1) } // AtomicModifyCustomResource mocks base method. -func (m *MockClientInterface) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f operatorclient.CustomResourceModifier, data interface{}) error { +func (m *MockClientInterface) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f operatorclient.CustomResourceModifier, data any) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AtomicModifyCustomResource", apiGroup, version, namespace, resourceKind, resourceName, f, data) ret0, _ := ret[0].(error) @@ -129,7 +135,7 @@ func (m *MockClientInterface) AtomicModifyCustomResource(apiGroup, version, name } // AtomicModifyCustomResource indicates an expected call of AtomicModifyCustomResource. -func (mr *MockClientInterfaceMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AtomicModifyCustomResource", reflect.TypeOf((*MockClientInterface)(nil).AtomicModifyCustomResource), apiGroup, version, namespace, resourceKind, resourceName, f, data) } @@ -144,7 +150,7 @@ func (m *MockClientInterface) CreateAPIService(arg0 *v16.APIService) (*v16.APISe } // CreateAPIService indicates an expected call of CreateAPIService. -func (mr *MockClientInterfaceMockRecorder) CreateAPIService(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateAPIService(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAPIService", reflect.TypeOf((*MockClientInterface)(nil).CreateAPIService), arg0) } @@ -159,7 +165,7 @@ func (m *MockClientInterface) CreateClusterRole(arg0 *v12.ClusterRole) (*v12.Clu } // CreateClusterRole indicates an expected call of CreateClusterRole. -func (mr *MockClientInterfaceMockRecorder) CreateClusterRole(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateClusterRole(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterRole", reflect.TypeOf((*MockClientInterface)(nil).CreateClusterRole), arg0) } @@ -174,7 +180,7 @@ func (m *MockClientInterface) CreateClusterRoleBinding(arg0 *v12.ClusterRoleBind } // CreateClusterRoleBinding indicates an expected call of CreateClusterRoleBinding. -func (mr *MockClientInterfaceMockRecorder) CreateClusterRoleBinding(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateClusterRoleBinding(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).CreateClusterRoleBinding), arg0) } @@ -189,7 +195,7 @@ func (m *MockClientInterface) CreateConfigMap(arg0 *v10.ConfigMap) (*v10.ConfigM } // CreateConfigMap indicates an expected call of CreateConfigMap. -func (mr *MockClientInterfaceMockRecorder) CreateConfigMap(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateConfigMap(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateConfigMap", reflect.TypeOf((*MockClientInterface)(nil).CreateConfigMap), arg0) } @@ -203,7 +209,7 @@ func (m *MockClientInterface) CreateCustomResource(item *unstructured.Unstructur } // CreateCustomResource indicates an expected call of CreateCustomResource. -func (mr *MockClientInterfaceMockRecorder) CreateCustomResource(item interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateCustomResource(item any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCustomResource", reflect.TypeOf((*MockClientInterface)(nil).CreateCustomResource), item) } @@ -217,7 +223,7 @@ func (m *MockClientInterface) CreateCustomResourceRaw(apiGroup, version, namespa } // CreateCustomResourceRaw indicates an expected call of CreateCustomResourceRaw. -func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCustomResourceRaw", reflect.TypeOf((*MockClientInterface)(nil).CreateCustomResourceRaw), apiGroup, version, namespace, kind, data) } @@ -232,7 +238,7 @@ func (m *MockClientInterface) CreateCustomResourceRawIfNotFound(apiGroup, versio } // CreateCustomResourceRawIfNotFound indicates an expected call of CreateCustomResourceRawIfNotFound. -func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCustomResourceRawIfNotFound", reflect.TypeOf((*MockClientInterface)(nil).CreateCustomResourceRawIfNotFound), apiGroup, version, namespace, kind, name, data) } @@ -247,7 +253,7 @@ func (m *MockClientInterface) CreateDeployment(arg0 *v1.Deployment) (*v1.Deploym } // CreateDeployment indicates an expected call of CreateDeployment. -func (mr *MockClientInterfaceMockRecorder) CreateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDeployment", reflect.TypeOf((*MockClientInterface)(nil).CreateDeployment), arg0) } @@ -262,7 +268,7 @@ func (m *MockClientInterface) CreateNetworkPolicy(arg0 *v11.NetworkPolicy) (*v11 } // CreateNetworkPolicy indicates an expected call of CreateNetworkPolicy. -func (mr *MockClientInterfaceMockRecorder) CreateNetworkPolicy(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateNetworkPolicy(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkPolicy", reflect.TypeOf((*MockClientInterface)(nil).CreateNetworkPolicy), arg0) } @@ -278,7 +284,7 @@ func (m *MockClientInterface) CreateOrRollingUpdateDeployment(arg0 *v1.Deploymen } // CreateOrRollingUpdateDeployment indicates an expected call of CreateOrRollingUpdateDeployment. -func (mr *MockClientInterfaceMockRecorder) CreateOrRollingUpdateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateOrRollingUpdateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrRollingUpdateDeployment", reflect.TypeOf((*MockClientInterface)(nil).CreateOrRollingUpdateDeployment), arg0) } @@ -292,7 +298,7 @@ func (m *MockClientInterface) CreateOrUpdateCustomeResourceRaw(apiGroup, version } // CreateOrUpdateCustomeResourceRaw indicates an expected call of CreateOrUpdateCustomeResourceRaw. -func (mr *MockClientInterfaceMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateCustomeResourceRaw", reflect.TypeOf((*MockClientInterface)(nil).CreateOrUpdateCustomeResourceRaw), apiGroup, version, namespace, resourceKind, resourceName, data) } @@ -307,7 +313,7 @@ func (m *MockClientInterface) CreateRole(arg0 *v12.Role) (*v12.Role, error) { } // CreateRole indicates an expected call of CreateRole. -func (mr *MockClientInterfaceMockRecorder) CreateRole(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateRole(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRole", reflect.TypeOf((*MockClientInterface)(nil).CreateRole), arg0) } @@ -322,7 +328,7 @@ func (m *MockClientInterface) CreateRoleBinding(arg0 *v12.RoleBinding) (*v12.Rol } // CreateRoleBinding indicates an expected call of CreateRoleBinding. -func (mr *MockClientInterfaceMockRecorder) CreateRoleBinding(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateRoleBinding(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).CreateRoleBinding), arg0) } @@ -337,7 +343,7 @@ func (m *MockClientInterface) CreateSecret(arg0 *v10.Secret) (*v10.Secret, error } // CreateSecret indicates an expected call of CreateSecret. -func (mr *MockClientInterfaceMockRecorder) CreateSecret(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateSecret(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockClientInterface)(nil).CreateSecret), arg0) } @@ -352,7 +358,7 @@ func (m *MockClientInterface) CreateService(arg0 *v10.Service) (*v10.Service, er } // CreateService indicates an expected call of CreateService. -func (mr *MockClientInterfaceMockRecorder) CreateService(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateService(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateService", reflect.TypeOf((*MockClientInterface)(nil).CreateService), arg0) } @@ -367,7 +373,7 @@ func (m *MockClientInterface) CreateServiceAccount(arg0 *v10.ServiceAccount) (*v } // CreateServiceAccount indicates an expected call of CreateServiceAccount. -func (mr *MockClientInterfaceMockRecorder) CreateServiceAccount(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) CreateServiceAccount(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateServiceAccount", reflect.TypeOf((*MockClientInterface)(nil).CreateServiceAccount), arg0) } @@ -381,7 +387,7 @@ func (m *MockClientInterface) DeleteAPIService(name string, options *v13.DeleteO } // DeleteAPIService indicates an expected call of DeleteAPIService. -func (mr *MockClientInterfaceMockRecorder) DeleteAPIService(name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteAPIService(name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAPIService", reflect.TypeOf((*MockClientInterface)(nil).DeleteAPIService), name, options) } @@ -395,7 +401,7 @@ func (m *MockClientInterface) DeleteClusterRole(name string, options *v13.Delete } // DeleteClusterRole indicates an expected call of DeleteClusterRole. -func (mr *MockClientInterfaceMockRecorder) DeleteClusterRole(name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteClusterRole(name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterRole", reflect.TypeOf((*MockClientInterface)(nil).DeleteClusterRole), name, options) } @@ -409,7 +415,7 @@ func (m *MockClientInterface) DeleteClusterRoleBinding(name string, options *v13 } // DeleteClusterRoleBinding indicates an expected call of DeleteClusterRoleBinding. -func (mr *MockClientInterfaceMockRecorder) DeleteClusterRoleBinding(name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteClusterRoleBinding(name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).DeleteClusterRoleBinding), name, options) } @@ -423,7 +429,7 @@ func (m *MockClientInterface) DeleteConfigMap(namespace, name string, options *v } // DeleteConfigMap indicates an expected call of DeleteConfigMap. -func (mr *MockClientInterfaceMockRecorder) DeleteConfigMap(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteConfigMap(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConfigMap", reflect.TypeOf((*MockClientInterface)(nil).DeleteConfigMap), namespace, name, options) } @@ -437,7 +443,7 @@ func (m *MockClientInterface) DeleteCustomResource(apiGroup, version, namespace, } // DeleteCustomResource indicates an expected call of DeleteCustomResource. -func (mr *MockClientInterfaceMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCustomResource", reflect.TypeOf((*MockClientInterface)(nil).DeleteCustomResource), apiGroup, version, namespace, resourceKind, resourceName) } @@ -451,7 +457,7 @@ func (m *MockClientInterface) DeleteDeployment(namespace, name string, options * } // DeleteDeployment indicates an expected call of DeleteDeployment. -func (mr *MockClientInterfaceMockRecorder) DeleteDeployment(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteDeployment(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDeployment", reflect.TypeOf((*MockClientInterface)(nil).DeleteDeployment), namespace, name, options) } @@ -465,7 +471,7 @@ func (m *MockClientInterface) DeleteNetworkPolicy(namespace, name string, option } // DeleteNetworkPolicy indicates an expected call of DeleteNetworkPolicy. -func (mr *MockClientInterfaceMockRecorder) DeleteNetworkPolicy(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteNetworkPolicy(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkPolicy", reflect.TypeOf((*MockClientInterface)(nil).DeleteNetworkPolicy), namespace, name, options) } @@ -479,7 +485,7 @@ func (m *MockClientInterface) DeleteRole(namespace, name string, options *v13.De } // DeleteRole indicates an expected call of DeleteRole. -func (mr *MockClientInterfaceMockRecorder) DeleteRole(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteRole(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRole", reflect.TypeOf((*MockClientInterface)(nil).DeleteRole), namespace, name, options) } @@ -493,7 +499,7 @@ func (m *MockClientInterface) DeleteRoleBinding(namespace, name string, options } // DeleteRoleBinding indicates an expected call of DeleteRoleBinding. -func (mr *MockClientInterfaceMockRecorder) DeleteRoleBinding(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteRoleBinding(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).DeleteRoleBinding), namespace, name, options) } @@ -507,7 +513,7 @@ func (m *MockClientInterface) DeleteSecret(namespace, name string, options *v13. } // DeleteSecret indicates an expected call of DeleteSecret. -func (mr *MockClientInterfaceMockRecorder) DeleteSecret(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteSecret(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockClientInterface)(nil).DeleteSecret), namespace, name, options) } @@ -521,7 +527,7 @@ func (m *MockClientInterface) DeleteService(namespace, name string, options *v13 } // DeleteService indicates an expected call of DeleteService. -func (mr *MockClientInterfaceMockRecorder) DeleteService(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteService(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteService", reflect.TypeOf((*MockClientInterface)(nil).DeleteService), namespace, name, options) } @@ -535,7 +541,7 @@ func (m *MockClientInterface) DeleteServiceAccount(namespace, name string, optio } // DeleteServiceAccount indicates an expected call of DeleteServiceAccount. -func (mr *MockClientInterfaceMockRecorder) DeleteServiceAccount(namespace, name, options interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) DeleteServiceAccount(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServiceAccount", reflect.TypeOf((*MockClientInterface)(nil).DeleteServiceAccount), namespace, name, options) } @@ -550,7 +556,7 @@ func (m *MockClientInterface) GetAPIService(name string) (*v16.APIService, error } // GetAPIService indicates an expected call of GetAPIService. -func (mr *MockClientInterfaceMockRecorder) GetAPIService(name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetAPIService(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIService", reflect.TypeOf((*MockClientInterface)(nil).GetAPIService), name) } @@ -565,7 +571,7 @@ func (m *MockClientInterface) GetClusterRole(name string) (*v12.ClusterRole, err } // GetClusterRole indicates an expected call of GetClusterRole. -func (mr *MockClientInterfaceMockRecorder) GetClusterRole(name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetClusterRole(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterRole", reflect.TypeOf((*MockClientInterface)(nil).GetClusterRole), name) } @@ -580,7 +586,7 @@ func (m *MockClientInterface) GetClusterRoleBinding(name string) (*v12.ClusterRo } // GetClusterRoleBinding indicates an expected call of GetClusterRoleBinding. -func (mr *MockClientInterfaceMockRecorder) GetClusterRoleBinding(name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetClusterRoleBinding(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).GetClusterRoleBinding), name) } @@ -595,7 +601,7 @@ func (m *MockClientInterface) GetConfigMap(namespace, name string) (*v10.ConfigM } // GetConfigMap indicates an expected call of GetConfigMap. -func (mr *MockClientInterfaceMockRecorder) GetConfigMap(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetConfigMap(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfigMap", reflect.TypeOf((*MockClientInterface)(nil).GetConfigMap), namespace, name) } @@ -610,7 +616,7 @@ func (m *MockClientInterface) GetCustomResource(apiGroup, version, namespace, re } // GetCustomResource indicates an expected call of GetCustomResource. -func (mr *MockClientInterfaceMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomResource", reflect.TypeOf((*MockClientInterface)(nil).GetCustomResource), apiGroup, version, namespace, resourceKind, resourceName) } @@ -625,7 +631,7 @@ func (m *MockClientInterface) GetCustomResourceRaw(apiGroup, version, namespace, } // GetCustomResourceRaw indicates an expected call of GetCustomResourceRaw. -func (mr *MockClientInterfaceMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomResourceRaw", reflect.TypeOf((*MockClientInterface)(nil).GetCustomResourceRaw), apiGroup, version, namespace, resourceKind, resourceName) } @@ -640,7 +646,7 @@ func (m *MockClientInterface) GetDeployment(namespace, name string) (*v1.Deploym } // GetDeployment indicates an expected call of GetDeployment. -func (mr *MockClientInterfaceMockRecorder) GetDeployment(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetDeployment(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeployment", reflect.TypeOf((*MockClientInterface)(nil).GetDeployment), namespace, name) } @@ -655,7 +661,7 @@ func (m *MockClientInterface) GetNetworkPolicy(namespace, name string) (*v11.Net } // GetNetworkPolicy indicates an expected call of GetNetworkPolicy. -func (mr *MockClientInterfaceMockRecorder) GetNetworkPolicy(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetNetworkPolicy(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPolicy", reflect.TypeOf((*MockClientInterface)(nil).GetNetworkPolicy), namespace, name) } @@ -670,7 +676,7 @@ func (m *MockClientInterface) GetRole(namespace, name string) (*v12.Role, error) } // GetRole indicates an expected call of GetRole. -func (mr *MockClientInterfaceMockRecorder) GetRole(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetRole(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRole", reflect.TypeOf((*MockClientInterface)(nil).GetRole), namespace, name) } @@ -685,7 +691,7 @@ func (m *MockClientInterface) GetRoleBinding(namespace, name string) (*v12.RoleB } // GetRoleBinding indicates an expected call of GetRoleBinding. -func (mr *MockClientInterfaceMockRecorder) GetRoleBinding(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetRoleBinding(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).GetRoleBinding), namespace, name) } @@ -700,7 +706,7 @@ func (m *MockClientInterface) GetSecret(namespace, name string) (*v10.Secret, er } // GetSecret indicates an expected call of GetSecret. -func (mr *MockClientInterfaceMockRecorder) GetSecret(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetSecret(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockClientInterface)(nil).GetSecret), namespace, name) } @@ -715,7 +721,7 @@ func (m *MockClientInterface) GetService(namespace, name string) (*v10.Service, } // GetService indicates an expected call of GetService. -func (mr *MockClientInterfaceMockRecorder) GetService(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetService(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockClientInterface)(nil).GetService), namespace, name) } @@ -730,7 +736,7 @@ func (m *MockClientInterface) GetServiceAccount(namespace, name string) (*v10.Se } // GetServiceAccount indicates an expected call of GetServiceAccount. -func (mr *MockClientInterfaceMockRecorder) GetServiceAccount(namespace, name interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) GetServiceAccount(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceAccount", reflect.TypeOf((*MockClientInterface)(nil).GetServiceAccount), namespace, name) } @@ -759,24 +765,24 @@ func (m *MockClientInterface) ListCustomResource(apiGroup, version, namespace, r } // ListCustomResource indicates an expected call of ListCustomResource. -func (mr *MockClientInterfaceMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCustomResource", reflect.TypeOf((*MockClientInterface)(nil).ListCustomResource), apiGroup, version, namespace, resourceKind) } // ListDeploymentsWithLabels mocks base method. -func (m *MockClientInterface) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*v1.DeploymentList, error) { +func (m *MockClientInterface) ListDeploymentsWithLabels(namespace string, arg1 labels.Set) (*v1.DeploymentList, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListDeploymentsWithLabels", namespace, labels) + ret := m.ctrl.Call(m, "ListDeploymentsWithLabels", namespace, arg1) ret0, _ := ret[0].(*v1.DeploymentList) ret1, _ := ret[1].(error) return ret0, ret1 } // ListDeploymentsWithLabels indicates an expected call of ListDeploymentsWithLabels. -func (mr *MockClientInterfaceMockRecorder) ListDeploymentsWithLabels(namespace, labels interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) ListDeploymentsWithLabels(namespace, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDeploymentsWithLabels", reflect.TypeOf((*MockClientInterface)(nil).ListDeploymentsWithLabels), namespace, labels) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDeploymentsWithLabels", reflect.TypeOf((*MockClientInterface)(nil).ListDeploymentsWithLabels), namespace, arg1) } // PatchDeployment mocks base method. @@ -790,7 +796,7 @@ func (m *MockClientInterface) PatchDeployment(arg0, arg1 *v1.Deployment) (*v1.De } // PatchDeployment indicates an expected call of PatchDeployment. -func (mr *MockClientInterfaceMockRecorder) PatchDeployment(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) PatchDeployment(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchDeployment", reflect.TypeOf((*MockClientInterface)(nil).PatchDeployment), arg0, arg1) } @@ -806,7 +812,7 @@ func (m *MockClientInterface) RollingPatchDeployment(arg0, arg1 *v1.Deployment) } // RollingPatchDeployment indicates an expected call of RollingPatchDeployment. -func (mr *MockClientInterfaceMockRecorder) RollingPatchDeployment(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) RollingPatchDeployment(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingPatchDeployment", reflect.TypeOf((*MockClientInterface)(nil).RollingPatchDeployment), arg0, arg1) } @@ -822,7 +828,7 @@ func (m *MockClientInterface) RollingPatchDeploymentMigrations(namespace, name s } // RollingPatchDeploymentMigrations indicates an expected call of RollingPatchDeploymentMigrations. -func (mr *MockClientInterfaceMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingPatchDeploymentMigrations", reflect.TypeOf((*MockClientInterface)(nil).RollingPatchDeploymentMigrations), namespace, name, f) } @@ -838,7 +844,7 @@ func (m *MockClientInterface) RollingUpdateDeployment(arg0 *v1.Deployment) (*v1. } // RollingUpdateDeployment indicates an expected call of RollingUpdateDeployment. -func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingUpdateDeployment", reflect.TypeOf((*MockClientInterface)(nil).RollingUpdateDeployment), arg0) } @@ -854,7 +860,7 @@ func (m *MockClientInterface) RollingUpdateDeploymentMigrations(namespace, name } // RollingUpdateDeploymentMigrations indicates an expected call of RollingUpdateDeploymentMigrations. -func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingUpdateDeploymentMigrations", reflect.TypeOf((*MockClientInterface)(nil).RollingUpdateDeploymentMigrations), namespace, name, f) } @@ -869,7 +875,7 @@ func (m *MockClientInterface) UpdateAPIService(modified *v16.APIService) (*v16.A } // UpdateAPIService indicates an expected call of UpdateAPIService. -func (mr *MockClientInterfaceMockRecorder) UpdateAPIService(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateAPIService(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAPIService", reflect.TypeOf((*MockClientInterface)(nil).UpdateAPIService), modified) } @@ -884,7 +890,7 @@ func (m *MockClientInterface) UpdateClusterRole(modified *v12.ClusterRole) (*v12 } // UpdateClusterRole indicates an expected call of UpdateClusterRole. -func (mr *MockClientInterfaceMockRecorder) UpdateClusterRole(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateClusterRole(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterRole", reflect.TypeOf((*MockClientInterface)(nil).UpdateClusterRole), modified) } @@ -899,7 +905,7 @@ func (m *MockClientInterface) UpdateClusterRoleBinding(modified *v12.ClusterRole } // UpdateClusterRoleBinding indicates an expected call of UpdateClusterRoleBinding. -func (mr *MockClientInterfaceMockRecorder) UpdateClusterRoleBinding(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateClusterRoleBinding(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).UpdateClusterRoleBinding), modified) } @@ -914,7 +920,7 @@ func (m *MockClientInterface) UpdateConfigMap(modified *v10.ConfigMap) (*v10.Con } // UpdateConfigMap indicates an expected call of UpdateConfigMap. -func (mr *MockClientInterfaceMockRecorder) UpdateConfigMap(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateConfigMap(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfigMap", reflect.TypeOf((*MockClientInterface)(nil).UpdateConfigMap), modified) } @@ -928,7 +934,7 @@ func (m *MockClientInterface) UpdateCustomResource(item *unstructured.Unstructur } // UpdateCustomResource indicates an expected call of UpdateCustomResource. -func (mr *MockClientInterfaceMockRecorder) UpdateCustomResource(item interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateCustomResource(item any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCustomResource", reflect.TypeOf((*MockClientInterface)(nil).UpdateCustomResource), item) } @@ -942,7 +948,7 @@ func (m *MockClientInterface) UpdateCustomResourceRaw(apiGroup, version, namespa } // UpdateCustomResourceRaw indicates an expected call of UpdateCustomResourceRaw. -func (mr *MockClientInterfaceMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCustomResourceRaw", reflect.TypeOf((*MockClientInterface)(nil).UpdateCustomResourceRaw), apiGroup, version, namespace, resourceKind, resourceName, data) } @@ -958,7 +964,7 @@ func (m *MockClientInterface) UpdateDeployment(arg0 *v1.Deployment) (*v1.Deploym } // UpdateDeployment indicates an expected call of UpdateDeployment. -func (mr *MockClientInterfaceMockRecorder) UpdateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDeployment", reflect.TypeOf((*MockClientInterface)(nil).UpdateDeployment), arg0) } @@ -973,7 +979,7 @@ func (m *MockClientInterface) UpdateNetworkPolicy(modified *v11.NetworkPolicy) ( } // UpdateNetworkPolicy indicates an expected call of UpdateNetworkPolicy. -func (mr *MockClientInterfaceMockRecorder) UpdateNetworkPolicy(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateNetworkPolicy(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkPolicy", reflect.TypeOf((*MockClientInterface)(nil).UpdateNetworkPolicy), modified) } @@ -988,7 +994,7 @@ func (m *MockClientInterface) UpdateRole(modified *v12.Role) (*v12.Role, error) } // UpdateRole indicates an expected call of UpdateRole. -func (mr *MockClientInterfaceMockRecorder) UpdateRole(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateRole(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRole", reflect.TypeOf((*MockClientInterface)(nil).UpdateRole), modified) } @@ -1003,7 +1009,7 @@ func (m *MockClientInterface) UpdateRoleBinding(modified *v12.RoleBinding) (*v12 } // UpdateRoleBinding indicates an expected call of UpdateRoleBinding. -func (mr *MockClientInterfaceMockRecorder) UpdateRoleBinding(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateRoleBinding(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRoleBinding", reflect.TypeOf((*MockClientInterface)(nil).UpdateRoleBinding), modified) } @@ -1018,7 +1024,7 @@ func (m *MockClientInterface) UpdateSecret(modified *v10.Secret) (*v10.Secret, e } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockClientInterfaceMockRecorder) UpdateSecret(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateSecret(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockClientInterface)(nil).UpdateSecret), modified) } @@ -1033,7 +1039,7 @@ func (m *MockClientInterface) UpdateService(modified *v10.Service) (*v10.Service } // UpdateService indicates an expected call of UpdateService. -func (mr *MockClientInterfaceMockRecorder) UpdateService(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateService(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockClientInterface)(nil).UpdateService), modified) } @@ -1048,7 +1054,7 @@ func (m *MockClientInterface) UpdateServiceAccount(modified *v10.ServiceAccount) } // UpdateServiceAccount indicates an expected call of UpdateServiceAccount. -func (mr *MockClientInterfaceMockRecorder) UpdateServiceAccount(modified interface{}) *gomock.Call { +func (mr *MockClientInterfaceMockRecorder) UpdateServiceAccount(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServiceAccount", reflect.TypeOf((*MockClientInterface)(nil).UpdateServiceAccount), modified) } @@ -1057,6 +1063,7 @@ func (mr *MockClientInterfaceMockRecorder) UpdateServiceAccount(modified interfa type MockCustomResourceClient struct { ctrl *gomock.Controller recorder *MockCustomResourceClientMockRecorder + isgomock struct{} } // MockCustomResourceClientMockRecorder is the mock recorder for MockCustomResourceClient. @@ -1077,7 +1084,7 @@ func (m *MockCustomResourceClient) EXPECT() *MockCustomResourceClientMockRecorde } // AtomicModifyCustomResource mocks base method. -func (m *MockCustomResourceClient) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f operatorclient.CustomResourceModifier, data interface{}) error { +func (m *MockCustomResourceClient) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName string, f operatorclient.CustomResourceModifier, data any) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AtomicModifyCustomResource", apiGroup, version, namespace, resourceKind, resourceName, f, data) ret0, _ := ret[0].(error) @@ -1085,7 +1092,7 @@ func (m *MockCustomResourceClient) AtomicModifyCustomResource(apiGroup, version, } // AtomicModifyCustomResource indicates an expected call of AtomicModifyCustomResource. -func (mr *MockCustomResourceClientMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) AtomicModifyCustomResource(apiGroup, version, namespace, resourceKind, resourceName, f, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AtomicModifyCustomResource", reflect.TypeOf((*MockCustomResourceClient)(nil).AtomicModifyCustomResource), apiGroup, version, namespace, resourceKind, resourceName, f, data) } @@ -1099,7 +1106,7 @@ func (m *MockCustomResourceClient) CreateCustomResource(item *unstructured.Unstr } // CreateCustomResource indicates an expected call of CreateCustomResource. -func (mr *MockCustomResourceClientMockRecorder) CreateCustomResource(item interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) CreateCustomResource(item any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCustomResource", reflect.TypeOf((*MockCustomResourceClient)(nil).CreateCustomResource), item) } @@ -1113,7 +1120,7 @@ func (m *MockCustomResourceClient) CreateCustomResourceRaw(apiGroup, version, na } // CreateCustomResourceRaw indicates an expected call of CreateCustomResourceRaw. -func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRaw(apiGroup, version, namespace, kind, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCustomResourceRaw", reflect.TypeOf((*MockCustomResourceClient)(nil).CreateCustomResourceRaw), apiGroup, version, namespace, kind, data) } @@ -1128,7 +1135,7 @@ func (m *MockCustomResourceClient) CreateCustomResourceRawIfNotFound(apiGroup, v } // CreateCustomResourceRawIfNotFound indicates an expected call of CreateCustomResourceRawIfNotFound. -func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) CreateCustomResourceRawIfNotFound(apiGroup, version, namespace, kind, name, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateCustomResourceRawIfNotFound", reflect.TypeOf((*MockCustomResourceClient)(nil).CreateCustomResourceRawIfNotFound), apiGroup, version, namespace, kind, name, data) } @@ -1142,7 +1149,7 @@ func (m *MockCustomResourceClient) CreateOrUpdateCustomeResourceRaw(apiGroup, ve } // CreateOrUpdateCustomeResourceRaw indicates an expected call of CreateOrUpdateCustomeResourceRaw. -func (mr *MockCustomResourceClientMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) CreateOrUpdateCustomeResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrUpdateCustomeResourceRaw", reflect.TypeOf((*MockCustomResourceClient)(nil).CreateOrUpdateCustomeResourceRaw), apiGroup, version, namespace, resourceKind, resourceName, data) } @@ -1156,7 +1163,7 @@ func (m *MockCustomResourceClient) DeleteCustomResource(apiGroup, version, names } // DeleteCustomResource indicates an expected call of DeleteCustomResource. -func (mr *MockCustomResourceClientMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) DeleteCustomResource(apiGroup, version, namespace, resourceKind, resourceName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteCustomResource", reflect.TypeOf((*MockCustomResourceClient)(nil).DeleteCustomResource), apiGroup, version, namespace, resourceKind, resourceName) } @@ -1171,7 +1178,7 @@ func (m *MockCustomResourceClient) GetCustomResource(apiGroup, version, namespac } // GetCustomResource indicates an expected call of GetCustomResource. -func (mr *MockCustomResourceClientMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) GetCustomResource(apiGroup, version, namespace, resourceKind, resourceName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomResource", reflect.TypeOf((*MockCustomResourceClient)(nil).GetCustomResource), apiGroup, version, namespace, resourceKind, resourceName) } @@ -1186,7 +1193,7 @@ func (m *MockCustomResourceClient) GetCustomResourceRaw(apiGroup, version, names } // GetCustomResourceRaw indicates an expected call of GetCustomResourceRaw. -func (mr *MockCustomResourceClientMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) GetCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCustomResourceRaw", reflect.TypeOf((*MockCustomResourceClient)(nil).GetCustomResourceRaw), apiGroup, version, namespace, resourceKind, resourceName) } @@ -1201,7 +1208,7 @@ func (m *MockCustomResourceClient) ListCustomResource(apiGroup, version, namespa } // ListCustomResource indicates an expected call of ListCustomResource. -func (mr *MockCustomResourceClientMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) ListCustomResource(apiGroup, version, namespace, resourceKind any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListCustomResource", reflect.TypeOf((*MockCustomResourceClient)(nil).ListCustomResource), apiGroup, version, namespace, resourceKind) } @@ -1215,7 +1222,7 @@ func (m *MockCustomResourceClient) UpdateCustomResource(item *unstructured.Unstr } // UpdateCustomResource indicates an expected call of UpdateCustomResource. -func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResource(item interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResource(item any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCustomResource", reflect.TypeOf((*MockCustomResourceClient)(nil).UpdateCustomResource), item) } @@ -1229,7 +1236,7 @@ func (m *MockCustomResourceClient) UpdateCustomResourceRaw(apiGroup, version, na } // UpdateCustomResourceRaw indicates an expected call of UpdateCustomResourceRaw. -func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data interface{}) *gomock.Call { +func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResourceRaw(apiGroup, version, namespace, resourceKind, resourceName, data any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateCustomResourceRaw", reflect.TypeOf((*MockCustomResourceClient)(nil).UpdateCustomResourceRaw), apiGroup, version, namespace, resourceKind, resourceName, data) } @@ -1238,6 +1245,7 @@ func (mr *MockCustomResourceClientMockRecorder) UpdateCustomResourceRaw(apiGroup type MockAPIServiceClient struct { ctrl *gomock.Controller recorder *MockAPIServiceClientMockRecorder + isgomock struct{} } // MockAPIServiceClientMockRecorder is the mock recorder for MockAPIServiceClient. @@ -1267,7 +1275,7 @@ func (m *MockAPIServiceClient) CreateAPIService(arg0 *v16.APIService) (*v16.APIS } // CreateAPIService indicates an expected call of CreateAPIService. -func (mr *MockAPIServiceClientMockRecorder) CreateAPIService(arg0 interface{}) *gomock.Call { +func (mr *MockAPIServiceClientMockRecorder) CreateAPIService(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateAPIService", reflect.TypeOf((*MockAPIServiceClient)(nil).CreateAPIService), arg0) } @@ -1281,7 +1289,7 @@ func (m *MockAPIServiceClient) DeleteAPIService(name string, options *v13.Delete } // DeleteAPIService indicates an expected call of DeleteAPIService. -func (mr *MockAPIServiceClientMockRecorder) DeleteAPIService(name, options interface{}) *gomock.Call { +func (mr *MockAPIServiceClientMockRecorder) DeleteAPIService(name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteAPIService", reflect.TypeOf((*MockAPIServiceClient)(nil).DeleteAPIService), name, options) } @@ -1296,7 +1304,7 @@ func (m *MockAPIServiceClient) GetAPIService(name string) (*v16.APIService, erro } // GetAPIService indicates an expected call of GetAPIService. -func (mr *MockAPIServiceClientMockRecorder) GetAPIService(name interface{}) *gomock.Call { +func (mr *MockAPIServiceClientMockRecorder) GetAPIService(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAPIService", reflect.TypeOf((*MockAPIServiceClient)(nil).GetAPIService), name) } @@ -1311,7 +1319,7 @@ func (m *MockAPIServiceClient) UpdateAPIService(modified *v16.APIService) (*v16. } // UpdateAPIService indicates an expected call of UpdateAPIService. -func (mr *MockAPIServiceClientMockRecorder) UpdateAPIService(modified interface{}) *gomock.Call { +func (mr *MockAPIServiceClientMockRecorder) UpdateAPIService(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateAPIService", reflect.TypeOf((*MockAPIServiceClient)(nil).UpdateAPIService), modified) } @@ -1320,6 +1328,7 @@ func (mr *MockAPIServiceClientMockRecorder) UpdateAPIService(modified interface{ type MockSecretClient struct { ctrl *gomock.Controller recorder *MockSecretClientMockRecorder + isgomock struct{} } // MockSecretClientMockRecorder is the mock recorder for MockSecretClient. @@ -1349,7 +1358,7 @@ func (m *MockSecretClient) CreateSecret(arg0 *v10.Secret) (*v10.Secret, error) { } // CreateSecret indicates an expected call of CreateSecret. -func (mr *MockSecretClientMockRecorder) CreateSecret(arg0 interface{}) *gomock.Call { +func (mr *MockSecretClientMockRecorder) CreateSecret(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateSecret", reflect.TypeOf((*MockSecretClient)(nil).CreateSecret), arg0) } @@ -1363,7 +1372,7 @@ func (m *MockSecretClient) DeleteSecret(namespace, name string, options *v13.Del } // DeleteSecret indicates an expected call of DeleteSecret. -func (mr *MockSecretClientMockRecorder) DeleteSecret(namespace, name, options interface{}) *gomock.Call { +func (mr *MockSecretClientMockRecorder) DeleteSecret(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteSecret", reflect.TypeOf((*MockSecretClient)(nil).DeleteSecret), namespace, name, options) } @@ -1378,7 +1387,7 @@ func (m *MockSecretClient) GetSecret(namespace, name string) (*v10.Secret, error } // GetSecret indicates an expected call of GetSecret. -func (mr *MockSecretClientMockRecorder) GetSecret(namespace, name interface{}) *gomock.Call { +func (mr *MockSecretClientMockRecorder) GetSecret(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSecret", reflect.TypeOf((*MockSecretClient)(nil).GetSecret), namespace, name) } @@ -1393,7 +1402,7 @@ func (m *MockSecretClient) UpdateSecret(modified *v10.Secret) (*v10.Secret, erro } // UpdateSecret indicates an expected call of UpdateSecret. -func (mr *MockSecretClientMockRecorder) UpdateSecret(modified interface{}) *gomock.Call { +func (mr *MockSecretClientMockRecorder) UpdateSecret(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSecret", reflect.TypeOf((*MockSecretClient)(nil).UpdateSecret), modified) } @@ -1402,6 +1411,7 @@ func (mr *MockSecretClientMockRecorder) UpdateSecret(modified interface{}) *gomo type MockServiceClient struct { ctrl *gomock.Controller recorder *MockServiceClientMockRecorder + isgomock struct{} } // MockServiceClientMockRecorder is the mock recorder for MockServiceClient. @@ -1431,7 +1441,7 @@ func (m *MockServiceClient) ApplyService(arg0 *v14.ServiceApplyConfiguration, ar } // ApplyService indicates an expected call of ApplyService. -func (mr *MockServiceClientMockRecorder) ApplyService(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockServiceClientMockRecorder) ApplyService(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyService", reflect.TypeOf((*MockServiceClient)(nil).ApplyService), arg0, arg1) } @@ -1446,7 +1456,7 @@ func (m *MockServiceClient) CreateService(arg0 *v10.Service) (*v10.Service, erro } // CreateService indicates an expected call of CreateService. -func (mr *MockServiceClientMockRecorder) CreateService(arg0 interface{}) *gomock.Call { +func (mr *MockServiceClientMockRecorder) CreateService(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateService", reflect.TypeOf((*MockServiceClient)(nil).CreateService), arg0) } @@ -1460,7 +1470,7 @@ func (m *MockServiceClient) DeleteService(namespace, name string, options *v13.D } // DeleteService indicates an expected call of DeleteService. -func (mr *MockServiceClientMockRecorder) DeleteService(namespace, name, options interface{}) *gomock.Call { +func (mr *MockServiceClientMockRecorder) DeleteService(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteService", reflect.TypeOf((*MockServiceClient)(nil).DeleteService), namespace, name, options) } @@ -1475,7 +1485,7 @@ func (m *MockServiceClient) GetService(namespace, name string) (*v10.Service, er } // GetService indicates an expected call of GetService. -func (mr *MockServiceClientMockRecorder) GetService(namespace, name interface{}) *gomock.Call { +func (mr *MockServiceClientMockRecorder) GetService(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetService", reflect.TypeOf((*MockServiceClient)(nil).GetService), namespace, name) } @@ -1490,7 +1500,7 @@ func (m *MockServiceClient) UpdateService(modified *v10.Service) (*v10.Service, } // UpdateService indicates an expected call of UpdateService. -func (mr *MockServiceClientMockRecorder) UpdateService(modified interface{}) *gomock.Call { +func (mr *MockServiceClientMockRecorder) UpdateService(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateService", reflect.TypeOf((*MockServiceClient)(nil).UpdateService), modified) } @@ -1499,6 +1509,7 @@ func (mr *MockServiceClientMockRecorder) UpdateService(modified interface{}) *go type MockServiceAccountClient struct { ctrl *gomock.Controller recorder *MockServiceAccountClientMockRecorder + isgomock struct{} } // MockServiceAccountClientMockRecorder is the mock recorder for MockServiceAccountClient. @@ -1528,7 +1539,7 @@ func (m *MockServiceAccountClient) CreateServiceAccount(arg0 *v10.ServiceAccount } // CreateServiceAccount indicates an expected call of CreateServiceAccount. -func (mr *MockServiceAccountClientMockRecorder) CreateServiceAccount(arg0 interface{}) *gomock.Call { +func (mr *MockServiceAccountClientMockRecorder) CreateServiceAccount(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateServiceAccount", reflect.TypeOf((*MockServiceAccountClient)(nil).CreateServiceAccount), arg0) } @@ -1542,7 +1553,7 @@ func (m *MockServiceAccountClient) DeleteServiceAccount(namespace, name string, } // DeleteServiceAccount indicates an expected call of DeleteServiceAccount. -func (mr *MockServiceAccountClientMockRecorder) DeleteServiceAccount(namespace, name, options interface{}) *gomock.Call { +func (mr *MockServiceAccountClientMockRecorder) DeleteServiceAccount(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteServiceAccount", reflect.TypeOf((*MockServiceAccountClient)(nil).DeleteServiceAccount), namespace, name, options) } @@ -1557,7 +1568,7 @@ func (m *MockServiceAccountClient) GetServiceAccount(namespace, name string) (*v } // GetServiceAccount indicates an expected call of GetServiceAccount. -func (mr *MockServiceAccountClientMockRecorder) GetServiceAccount(namespace, name interface{}) *gomock.Call { +func (mr *MockServiceAccountClientMockRecorder) GetServiceAccount(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetServiceAccount", reflect.TypeOf((*MockServiceAccountClient)(nil).GetServiceAccount), namespace, name) } @@ -1572,7 +1583,7 @@ func (m *MockServiceAccountClient) UpdateServiceAccount(modified *v10.ServiceAcc } // UpdateServiceAccount indicates an expected call of UpdateServiceAccount. -func (mr *MockServiceAccountClientMockRecorder) UpdateServiceAccount(modified interface{}) *gomock.Call { +func (mr *MockServiceAccountClientMockRecorder) UpdateServiceAccount(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateServiceAccount", reflect.TypeOf((*MockServiceAccountClient)(nil).UpdateServiceAccount), modified) } @@ -1581,6 +1592,7 @@ func (mr *MockServiceAccountClientMockRecorder) UpdateServiceAccount(modified in type MockRoleClient struct { ctrl *gomock.Controller recorder *MockRoleClientMockRecorder + isgomock struct{} } // MockRoleClientMockRecorder is the mock recorder for MockRoleClient. @@ -1610,7 +1622,7 @@ func (m *MockRoleClient) CreateRole(arg0 *v12.Role) (*v12.Role, error) { } // CreateRole indicates an expected call of CreateRole. -func (mr *MockRoleClientMockRecorder) CreateRole(arg0 interface{}) *gomock.Call { +func (mr *MockRoleClientMockRecorder) CreateRole(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRole", reflect.TypeOf((*MockRoleClient)(nil).CreateRole), arg0) } @@ -1624,7 +1636,7 @@ func (m *MockRoleClient) DeleteRole(namespace, name string, options *v13.DeleteO } // DeleteRole indicates an expected call of DeleteRole. -func (mr *MockRoleClientMockRecorder) DeleteRole(namespace, name, options interface{}) *gomock.Call { +func (mr *MockRoleClientMockRecorder) DeleteRole(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRole", reflect.TypeOf((*MockRoleClient)(nil).DeleteRole), namespace, name, options) } @@ -1639,7 +1651,7 @@ func (m *MockRoleClient) GetRole(namespace, name string) (*v12.Role, error) { } // GetRole indicates an expected call of GetRole. -func (mr *MockRoleClientMockRecorder) GetRole(namespace, name interface{}) *gomock.Call { +func (mr *MockRoleClientMockRecorder) GetRole(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRole", reflect.TypeOf((*MockRoleClient)(nil).GetRole), namespace, name) } @@ -1654,7 +1666,7 @@ func (m *MockRoleClient) UpdateRole(modified *v12.Role) (*v12.Role, error) { } // UpdateRole indicates an expected call of UpdateRole. -func (mr *MockRoleClientMockRecorder) UpdateRole(modified interface{}) *gomock.Call { +func (mr *MockRoleClientMockRecorder) UpdateRole(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRole", reflect.TypeOf((*MockRoleClient)(nil).UpdateRole), modified) } @@ -1663,6 +1675,7 @@ func (mr *MockRoleClientMockRecorder) UpdateRole(modified interface{}) *gomock.C type MockRoleBindingClient struct { ctrl *gomock.Controller recorder *MockRoleBindingClientMockRecorder + isgomock struct{} } // MockRoleBindingClientMockRecorder is the mock recorder for MockRoleBindingClient. @@ -1692,7 +1705,7 @@ func (m *MockRoleBindingClient) ApplyRoleBinding(applyConfig *v15.RoleBindingApp } // ApplyRoleBinding indicates an expected call of ApplyRoleBinding. -func (mr *MockRoleBindingClientMockRecorder) ApplyRoleBinding(applyConfig, applyOptions interface{}) *gomock.Call { +func (mr *MockRoleBindingClientMockRecorder) ApplyRoleBinding(applyConfig, applyOptions any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyRoleBinding", reflect.TypeOf((*MockRoleBindingClient)(nil).ApplyRoleBinding), applyConfig, applyOptions) } @@ -1707,7 +1720,7 @@ func (m *MockRoleBindingClient) CreateRoleBinding(arg0 *v12.RoleBinding) (*v12.R } // CreateRoleBinding indicates an expected call of CreateRoleBinding. -func (mr *MockRoleBindingClientMockRecorder) CreateRoleBinding(arg0 interface{}) *gomock.Call { +func (mr *MockRoleBindingClientMockRecorder) CreateRoleBinding(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateRoleBinding", reflect.TypeOf((*MockRoleBindingClient)(nil).CreateRoleBinding), arg0) } @@ -1721,7 +1734,7 @@ func (m *MockRoleBindingClient) DeleteRoleBinding(namespace, name string, option } // DeleteRoleBinding indicates an expected call of DeleteRoleBinding. -func (mr *MockRoleBindingClientMockRecorder) DeleteRoleBinding(namespace, name, options interface{}) *gomock.Call { +func (mr *MockRoleBindingClientMockRecorder) DeleteRoleBinding(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRoleBinding", reflect.TypeOf((*MockRoleBindingClient)(nil).DeleteRoleBinding), namespace, name, options) } @@ -1736,7 +1749,7 @@ func (m *MockRoleBindingClient) GetRoleBinding(namespace, name string) (*v12.Rol } // GetRoleBinding indicates an expected call of GetRoleBinding. -func (mr *MockRoleBindingClientMockRecorder) GetRoleBinding(namespace, name interface{}) *gomock.Call { +func (mr *MockRoleBindingClientMockRecorder) GetRoleBinding(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleBinding", reflect.TypeOf((*MockRoleBindingClient)(nil).GetRoleBinding), namespace, name) } @@ -1751,7 +1764,7 @@ func (m *MockRoleBindingClient) UpdateRoleBinding(modified *v12.RoleBinding) (*v } // UpdateRoleBinding indicates an expected call of UpdateRoleBinding. -func (mr *MockRoleBindingClientMockRecorder) UpdateRoleBinding(modified interface{}) *gomock.Call { +func (mr *MockRoleBindingClientMockRecorder) UpdateRoleBinding(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRoleBinding", reflect.TypeOf((*MockRoleBindingClient)(nil).UpdateRoleBinding), modified) } @@ -1760,6 +1773,7 @@ func (mr *MockRoleBindingClientMockRecorder) UpdateRoleBinding(modified interfac type MockClusterRoleClient struct { ctrl *gomock.Controller recorder *MockClusterRoleClientMockRecorder + isgomock struct{} } // MockClusterRoleClientMockRecorder is the mock recorder for MockClusterRoleClient. @@ -1789,7 +1803,7 @@ func (m *MockClusterRoleClient) CreateClusterRole(arg0 *v12.ClusterRole) (*v12.C } // CreateClusterRole indicates an expected call of CreateClusterRole. -func (mr *MockClusterRoleClientMockRecorder) CreateClusterRole(arg0 interface{}) *gomock.Call { +func (mr *MockClusterRoleClientMockRecorder) CreateClusterRole(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterRole", reflect.TypeOf((*MockClusterRoleClient)(nil).CreateClusterRole), arg0) } @@ -1803,7 +1817,7 @@ func (m *MockClusterRoleClient) DeleteClusterRole(name string, options *v13.Dele } // DeleteClusterRole indicates an expected call of DeleteClusterRole. -func (mr *MockClusterRoleClientMockRecorder) DeleteClusterRole(name, options interface{}) *gomock.Call { +func (mr *MockClusterRoleClientMockRecorder) DeleteClusterRole(name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterRole", reflect.TypeOf((*MockClusterRoleClient)(nil).DeleteClusterRole), name, options) } @@ -1818,7 +1832,7 @@ func (m *MockClusterRoleClient) GetClusterRole(name string) (*v12.ClusterRole, e } // GetClusterRole indicates an expected call of GetClusterRole. -func (mr *MockClusterRoleClientMockRecorder) GetClusterRole(name interface{}) *gomock.Call { +func (mr *MockClusterRoleClientMockRecorder) GetClusterRole(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterRole", reflect.TypeOf((*MockClusterRoleClient)(nil).GetClusterRole), name) } @@ -1833,7 +1847,7 @@ func (m *MockClusterRoleClient) UpdateClusterRole(modified *v12.ClusterRole) (*v } // UpdateClusterRole indicates an expected call of UpdateClusterRole. -func (mr *MockClusterRoleClientMockRecorder) UpdateClusterRole(modified interface{}) *gomock.Call { +func (mr *MockClusterRoleClientMockRecorder) UpdateClusterRole(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterRole", reflect.TypeOf((*MockClusterRoleClient)(nil).UpdateClusterRole), modified) } @@ -1842,6 +1856,7 @@ func (mr *MockClusterRoleClientMockRecorder) UpdateClusterRole(modified interfac type MockClusterRoleBindingClient struct { ctrl *gomock.Controller recorder *MockClusterRoleBindingClientMockRecorder + isgomock struct{} } // MockClusterRoleBindingClientMockRecorder is the mock recorder for MockClusterRoleBindingClient. @@ -1871,7 +1886,7 @@ func (m *MockClusterRoleBindingClient) ApplyClusterRoleBinding(applyConfig *v15. } // ApplyClusterRoleBinding indicates an expected call of ApplyClusterRoleBinding. -func (mr *MockClusterRoleBindingClientMockRecorder) ApplyClusterRoleBinding(applyConfig, applyOptions interface{}) *gomock.Call { +func (mr *MockClusterRoleBindingClientMockRecorder) ApplyClusterRoleBinding(applyConfig, applyOptions any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyClusterRoleBinding", reflect.TypeOf((*MockClusterRoleBindingClient)(nil).ApplyClusterRoleBinding), applyConfig, applyOptions) } @@ -1886,7 +1901,7 @@ func (m *MockClusterRoleBindingClient) CreateClusterRoleBinding(arg0 *v12.Cluste } // CreateClusterRoleBinding indicates an expected call of CreateClusterRoleBinding. -func (mr *MockClusterRoleBindingClientMockRecorder) CreateClusterRoleBinding(arg0 interface{}) *gomock.Call { +func (mr *MockClusterRoleBindingClientMockRecorder) CreateClusterRoleBinding(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateClusterRoleBinding", reflect.TypeOf((*MockClusterRoleBindingClient)(nil).CreateClusterRoleBinding), arg0) } @@ -1900,7 +1915,7 @@ func (m *MockClusterRoleBindingClient) DeleteClusterRoleBinding(name string, opt } // DeleteClusterRoleBinding indicates an expected call of DeleteClusterRoleBinding. -func (mr *MockClusterRoleBindingClientMockRecorder) DeleteClusterRoleBinding(name, options interface{}) *gomock.Call { +func (mr *MockClusterRoleBindingClientMockRecorder) DeleteClusterRoleBinding(name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteClusterRoleBinding", reflect.TypeOf((*MockClusterRoleBindingClient)(nil).DeleteClusterRoleBinding), name, options) } @@ -1915,7 +1930,7 @@ func (m *MockClusterRoleBindingClient) GetClusterRoleBinding(name string) (*v12. } // GetClusterRoleBinding indicates an expected call of GetClusterRoleBinding. -func (mr *MockClusterRoleBindingClientMockRecorder) GetClusterRoleBinding(name interface{}) *gomock.Call { +func (mr *MockClusterRoleBindingClientMockRecorder) GetClusterRoleBinding(name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetClusterRoleBinding", reflect.TypeOf((*MockClusterRoleBindingClient)(nil).GetClusterRoleBinding), name) } @@ -1930,7 +1945,7 @@ func (m *MockClusterRoleBindingClient) UpdateClusterRoleBinding(modified *v12.Cl } // UpdateClusterRoleBinding indicates an expected call of UpdateClusterRoleBinding. -func (mr *MockClusterRoleBindingClientMockRecorder) UpdateClusterRoleBinding(modified interface{}) *gomock.Call { +func (mr *MockClusterRoleBindingClientMockRecorder) UpdateClusterRoleBinding(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateClusterRoleBinding", reflect.TypeOf((*MockClusterRoleBindingClient)(nil).UpdateClusterRoleBinding), modified) } @@ -1939,6 +1954,7 @@ func (mr *MockClusterRoleBindingClientMockRecorder) UpdateClusterRoleBinding(mod type MockDeploymentClient struct { ctrl *gomock.Controller recorder *MockDeploymentClientMockRecorder + isgomock struct{} } // MockDeploymentClientMockRecorder is the mock recorder for MockDeploymentClient. @@ -1968,7 +1984,7 @@ func (m *MockDeploymentClient) CreateDeployment(arg0 *v1.Deployment) (*v1.Deploy } // CreateDeployment indicates an expected call of CreateDeployment. -func (mr *MockDeploymentClientMockRecorder) CreateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) CreateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).CreateDeployment), arg0) } @@ -1984,7 +2000,7 @@ func (m *MockDeploymentClient) CreateOrRollingUpdateDeployment(arg0 *v1.Deployme } // CreateOrRollingUpdateDeployment indicates an expected call of CreateOrRollingUpdateDeployment. -func (mr *MockDeploymentClientMockRecorder) CreateOrRollingUpdateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) CreateOrRollingUpdateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateOrRollingUpdateDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).CreateOrRollingUpdateDeployment), arg0) } @@ -1998,7 +2014,7 @@ func (m *MockDeploymentClient) DeleteDeployment(namespace, name string, options } // DeleteDeployment indicates an expected call of DeleteDeployment. -func (mr *MockDeploymentClientMockRecorder) DeleteDeployment(namespace, name, options interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) DeleteDeployment(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).DeleteDeployment), namespace, name, options) } @@ -2013,24 +2029,24 @@ func (m *MockDeploymentClient) GetDeployment(namespace, name string) (*v1.Deploy } // GetDeployment indicates an expected call of GetDeployment. -func (mr *MockDeploymentClientMockRecorder) GetDeployment(namespace, name interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) GetDeployment(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).GetDeployment), namespace, name) } // ListDeploymentsWithLabels mocks base method. -func (m *MockDeploymentClient) ListDeploymentsWithLabels(namespace string, labels labels.Set) (*v1.DeploymentList, error) { +func (m *MockDeploymentClient) ListDeploymentsWithLabels(namespace string, arg1 labels.Set) (*v1.DeploymentList, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListDeploymentsWithLabels", namespace, labels) + ret := m.ctrl.Call(m, "ListDeploymentsWithLabels", namespace, arg1) ret0, _ := ret[0].(*v1.DeploymentList) ret1, _ := ret[1].(error) return ret0, ret1 } // ListDeploymentsWithLabels indicates an expected call of ListDeploymentsWithLabels. -func (mr *MockDeploymentClientMockRecorder) ListDeploymentsWithLabels(namespace, labels interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) ListDeploymentsWithLabels(namespace, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDeploymentsWithLabels", reflect.TypeOf((*MockDeploymentClient)(nil).ListDeploymentsWithLabels), namespace, labels) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListDeploymentsWithLabels", reflect.TypeOf((*MockDeploymentClient)(nil).ListDeploymentsWithLabels), namespace, arg1) } // PatchDeployment mocks base method. @@ -2044,7 +2060,7 @@ func (m *MockDeploymentClient) PatchDeployment(arg0, arg1 *v1.Deployment) (*v1.D } // PatchDeployment indicates an expected call of PatchDeployment. -func (mr *MockDeploymentClientMockRecorder) PatchDeployment(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) PatchDeployment(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PatchDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).PatchDeployment), arg0, arg1) } @@ -2060,7 +2076,7 @@ func (m *MockDeploymentClient) RollingPatchDeployment(arg0, arg1 *v1.Deployment) } // RollingPatchDeployment indicates an expected call of RollingPatchDeployment. -func (mr *MockDeploymentClientMockRecorder) RollingPatchDeployment(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) RollingPatchDeployment(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingPatchDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).RollingPatchDeployment), arg0, arg1) } @@ -2076,7 +2092,7 @@ func (m *MockDeploymentClient) RollingPatchDeploymentMigrations(namespace, name } // RollingPatchDeploymentMigrations indicates an expected call of RollingPatchDeploymentMigrations. -func (mr *MockDeploymentClientMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) RollingPatchDeploymentMigrations(namespace, name, f any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingPatchDeploymentMigrations", reflect.TypeOf((*MockDeploymentClient)(nil).RollingPatchDeploymentMigrations), namespace, name, f) } @@ -2092,7 +2108,7 @@ func (m *MockDeploymentClient) RollingUpdateDeployment(arg0 *v1.Deployment) (*v1 } // RollingUpdateDeployment indicates an expected call of RollingUpdateDeployment. -func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingUpdateDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).RollingUpdateDeployment), arg0) } @@ -2108,7 +2124,7 @@ func (m *MockDeploymentClient) RollingUpdateDeploymentMigrations(namespace, name } // RollingUpdateDeploymentMigrations indicates an expected call of RollingUpdateDeploymentMigrations. -func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) RollingUpdateDeploymentMigrations(namespace, name, f any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RollingUpdateDeploymentMigrations", reflect.TypeOf((*MockDeploymentClient)(nil).RollingUpdateDeploymentMigrations), namespace, name, f) } @@ -2124,7 +2140,7 @@ func (m *MockDeploymentClient) UpdateDeployment(arg0 *v1.Deployment) (*v1.Deploy } // UpdateDeployment indicates an expected call of UpdateDeployment. -func (mr *MockDeploymentClientMockRecorder) UpdateDeployment(arg0 interface{}) *gomock.Call { +func (mr *MockDeploymentClientMockRecorder) UpdateDeployment(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateDeployment", reflect.TypeOf((*MockDeploymentClient)(nil).UpdateDeployment), arg0) } @@ -2133,6 +2149,7 @@ func (mr *MockDeploymentClientMockRecorder) UpdateDeployment(arg0 interface{}) * type MockConfigMapClient struct { ctrl *gomock.Controller recorder *MockConfigMapClientMockRecorder + isgomock struct{} } // MockConfigMapClientMockRecorder is the mock recorder for MockConfigMapClient. @@ -2162,7 +2179,7 @@ func (m *MockConfigMapClient) CreateConfigMap(arg0 *v10.ConfigMap) (*v10.ConfigM } // CreateConfigMap indicates an expected call of CreateConfigMap. -func (mr *MockConfigMapClientMockRecorder) CreateConfigMap(arg0 interface{}) *gomock.Call { +func (mr *MockConfigMapClientMockRecorder) CreateConfigMap(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateConfigMap", reflect.TypeOf((*MockConfigMapClient)(nil).CreateConfigMap), arg0) } @@ -2176,7 +2193,7 @@ func (m *MockConfigMapClient) DeleteConfigMap(namespace, name string, options *v } // DeleteConfigMap indicates an expected call of DeleteConfigMap. -func (mr *MockConfigMapClientMockRecorder) DeleteConfigMap(namespace, name, options interface{}) *gomock.Call { +func (mr *MockConfigMapClientMockRecorder) DeleteConfigMap(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConfigMap", reflect.TypeOf((*MockConfigMapClient)(nil).DeleteConfigMap), namespace, name, options) } @@ -2191,7 +2208,7 @@ func (m *MockConfigMapClient) GetConfigMap(namespace, name string) (*v10.ConfigM } // GetConfigMap indicates an expected call of GetConfigMap. -func (mr *MockConfigMapClientMockRecorder) GetConfigMap(namespace, name interface{}) *gomock.Call { +func (mr *MockConfigMapClientMockRecorder) GetConfigMap(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetConfigMap", reflect.TypeOf((*MockConfigMapClient)(nil).GetConfigMap), namespace, name) } @@ -2206,7 +2223,7 @@ func (m *MockConfigMapClient) UpdateConfigMap(modified *v10.ConfigMap) (*v10.Con } // UpdateConfigMap indicates an expected call of UpdateConfigMap. -func (mr *MockConfigMapClientMockRecorder) UpdateConfigMap(modified interface{}) *gomock.Call { +func (mr *MockConfigMapClientMockRecorder) UpdateConfigMap(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateConfigMap", reflect.TypeOf((*MockConfigMapClient)(nil).UpdateConfigMap), modified) } @@ -2215,6 +2232,7 @@ func (mr *MockConfigMapClientMockRecorder) UpdateConfigMap(modified interface{}) type MockNetworkPolicyClient struct { ctrl *gomock.Controller recorder *MockNetworkPolicyClientMockRecorder + isgomock struct{} } // MockNetworkPolicyClientMockRecorder is the mock recorder for MockNetworkPolicyClient. @@ -2244,7 +2262,7 @@ func (m *MockNetworkPolicyClient) CreateNetworkPolicy(arg0 *v11.NetworkPolicy) ( } // CreateNetworkPolicy indicates an expected call of CreateNetworkPolicy. -func (mr *MockNetworkPolicyClientMockRecorder) CreateNetworkPolicy(arg0 interface{}) *gomock.Call { +func (mr *MockNetworkPolicyClientMockRecorder) CreateNetworkPolicy(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateNetworkPolicy", reflect.TypeOf((*MockNetworkPolicyClient)(nil).CreateNetworkPolicy), arg0) } @@ -2258,7 +2276,7 @@ func (m *MockNetworkPolicyClient) DeleteNetworkPolicy(namespace, name string, op } // DeleteNetworkPolicy indicates an expected call of DeleteNetworkPolicy. -func (mr *MockNetworkPolicyClientMockRecorder) DeleteNetworkPolicy(namespace, name, options interface{}) *gomock.Call { +func (mr *MockNetworkPolicyClientMockRecorder) DeleteNetworkPolicy(namespace, name, options any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteNetworkPolicy", reflect.TypeOf((*MockNetworkPolicyClient)(nil).DeleteNetworkPolicy), namespace, name, options) } @@ -2273,7 +2291,7 @@ func (m *MockNetworkPolicyClient) GetNetworkPolicy(namespace, name string) (*v11 } // GetNetworkPolicy indicates an expected call of GetNetworkPolicy. -func (mr *MockNetworkPolicyClientMockRecorder) GetNetworkPolicy(namespace, name interface{}) *gomock.Call { +func (mr *MockNetworkPolicyClientMockRecorder) GetNetworkPolicy(namespace, name any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetNetworkPolicy", reflect.TypeOf((*MockNetworkPolicyClient)(nil).GetNetworkPolicy), namespace, name) } @@ -2288,7 +2306,7 @@ func (m *MockNetworkPolicyClient) UpdateNetworkPolicy(modified *v11.NetworkPolic } // UpdateNetworkPolicy indicates an expected call of UpdateNetworkPolicy. -func (mr *MockNetworkPolicyClientMockRecorder) UpdateNetworkPolicy(modified interface{}) *gomock.Call { +func (mr *MockNetworkPolicyClientMockRecorder) UpdateNetworkPolicy(modified any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateNetworkPolicy", reflect.TypeOf((*MockNetworkPolicyClient)(nil).UpdateNetworkPolicy), modified) } diff --git a/staging/operator-lifecycle-manager/tools.go b/staging/operator-lifecycle-manager/tools.go index 8d08220181..59db5ecf7d 100644 --- a/staging/operator-lifecycle-manager/tools.go +++ b/staging/operator-lifecycle-manager/tools.go @@ -13,8 +13,8 @@ import _ "github.com/operator-framework/api/crds" // operators.coreos.com CRD ma // mock-generation // These tools are referenced in //go:generate directives in the code import ( - _ "github.com/golang/mock/mockgen" _ "github.com/maxbrunsfeld/counterfeiter/v6" + _ "go.uber.org/mock/mockgen" ) // k8s code generators diff --git a/tests-extension/vendor/github.com/JeffAshton/win_pdh/pdh.go b/tests-extension/vendor/github.com/JeffAshton/win_pdh/pdh.go index 56199001af..af80791383 100644 --- a/tests-extension/vendor/github.com/JeffAshton/win_pdh/pdh.go +++ b/tests-extension/vendor/github.com/JeffAshton/win_pdh/pdh.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build windows // +build windows package win_pdh @@ -13,12 +14,12 @@ import ( // Error codes const ( - ERROR_SUCCESS = 0 - ERROR_INVALID_FUNCTION = 1 + ERROR_SUCCESS = 0 + ERROR_INVALID_FUNCTION = 1 ) type ( - HANDLE uintptr + HANDLE uintptr ) // PDH error codes, which can be returned by all Pdh* functions. Taken from mingw-w64 pdhmsg.h @@ -216,7 +217,7 @@ func init() { // full implemention of the pdh.dll API, except with a GUI and all that. The registry setting also provides an // interface to the available counters, and can be found at the following key: // -// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\CurrentLanguage +// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\CurrentLanguage // // This registry key contains several values as follows: // @@ -278,9 +279,9 @@ func PdhCloseQuery(hQuery PDH_HQUERY) uint32 { // of the counter can be extracted with PdhGetFormattedCounterValue(). For example, the following code // requires at least two calls: // -// var handle win.PDH_HQUERY -// var counterHandle win.PDH_HCOUNTER -// ret := win.PdhOpenQuery(0, 0, &handle) +// var handle win.PDH_HQUERY +// var counterHandle win.PDH_HCOUNTER +// ret := win.PdhOpenQuery(0, 0, &handle) // ret = win.PdhAddEnglishCounter(handle, "\\Processor(_Total)\\% Idle Time", 0, &counterHandle) // var derp win.PDH_FMT_COUNTERVALUE_DOUBLE // diff --git a/tests-extension/vendor/github.com/beorn7/perks/quantile/stream.go b/tests-extension/vendor/github.com/beorn7/perks/quantile/stream.go index d7d14f8eb6..593625434f 100644 --- a/tests-extension/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/tests-extension/vendor/github.com/beorn7/perks/quantile/stream.go @@ -9,7 +9,7 @@ // // For more detailed information about the algorithm used, see: // -// Effective Computation of Biased Quantiles over Data Streams +// # Effective Computation of Biased Quantiles over Data Streams // // http://www.cs.rutgers.edu/~muthu/bquant.pdf package quantile diff --git a/tests-extension/vendor/github.com/blang/semver/v4/range.go b/tests-extension/vendor/github.com/blang/semver/v4/range.go index 95f7139b97..b6ee1d8bcb 100644 --- a/tests-extension/vendor/github.com/blang/semver/v4/range.go +++ b/tests-extension/vendor/github.com/blang/semver/v4/range.go @@ -67,8 +67,8 @@ func (vr *versionRange) rangeFunc() Range { // Range represents a range of versions. // A Range can be used to check if a Version satisfies it: // -// range, err := semver.ParseRange(">1.0.0 <2.0.0") -// range(semver.MustParse("1.1.1") // returns true +// range, err := semver.ParseRange(">1.0.0 <2.0.0") +// range(semver.MustParse("1.1.1") // returns true type Range func(Version) bool // OR combines the existing Range with another Range using logical OR. @@ -108,7 +108,7 @@ func (rf Range) AND(f Range) Range { // // Ranges can be combined by both AND and OR // -// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` +// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` func ParseRange(s string) (Range, error) { parts := splitAndTrim(s) orParts, err := splitORParts(parts) diff --git a/tests-extension/vendor/github.com/cenkalti/backoff/v4/exponential.go b/tests-extension/vendor/github.com/cenkalti/backoff/v4/exponential.go index aac99f196a..c022296a28 100644 --- a/tests-extension/vendor/github.com/cenkalti/backoff/v4/exponential.go +++ b/tests-extension/vendor/github.com/cenkalti/backoff/v4/exponential.go @@ -11,17 +11,17 @@ period for each retry attempt using a randomization function that grows exponent NextBackOff() is calculated using the following formula: - randomized interval = - RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) + randomized interval = + RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor]) In other words NextBackOff() will range between the randomization factor percentage below and above the retry interval. For example, given the following parameters: - RetryInterval = 2 - RandomizationFactor = 0.5 - Multiplier = 2 + RetryInterval = 2 + RandomizationFactor = 0.5 + Multiplier = 2 the actual backoff period used in the next retry attempt will range between 1 and 3 seconds, multiplied by the exponential, that is, between 2 and 6 seconds. @@ -36,18 +36,18 @@ The elapsed time can be reset by calling Reset(). Example: Given the following default arguments, for 10 tries the sequence will be, and assuming we go over the MaxElapsedTime on the 10th try: - Request # RetryInterval (seconds) Randomized Interval (seconds) + Request # RetryInterval (seconds) Randomized Interval (seconds) - 1 0.5 [0.25, 0.75] - 2 0.75 [0.375, 1.125] - 3 1.125 [0.562, 1.687] - 4 1.687 [0.8435, 2.53] - 5 2.53 [1.265, 3.795] - 6 3.795 [1.897, 5.692] - 7 5.692 [2.846, 8.538] - 8 8.538 [4.269, 12.807] - 9 12.807 [6.403, 19.210] - 10 19.210 backoff.Stop + 1 0.5 [0.25, 0.75] + 2 0.75 [0.375, 1.125] + 3 1.125 [0.562, 1.687] + 4 1.687 [0.8435, 2.53] + 5 2.53 [1.265, 3.795] + 6 3.795 [1.897, 5.692] + 7 5.692 [2.846, 8.538] + 8 8.538 [4.269, 12.807] + 9 12.807 [6.403, 19.210] + 10 19.210 backoff.Stop Note: Implementation is not thread-safe. */ @@ -167,7 +167,8 @@ func (b *ExponentialBackOff) Reset() { } // NextBackOff calculates the next backoff interval using the formula: -// Randomized interval = RetryInterval * (1 ± RandomizationFactor) +// +// Randomized interval = RetryInterval * (1 ± RandomizationFactor) func (b *ExponentialBackOff) NextBackOff() time.Duration { // Make sure we have not gone over the maximum elapsed time. elapsed := b.GetElapsedTime() @@ -200,7 +201,8 @@ func (b *ExponentialBackOff) incrementCurrentInterval() { } // Returns a random value from the following interval: -// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval]. +// +// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval]. func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration { if randomizationFactor == 0 { return currentInterval // make sure no randomness is used when randomizationFactor is 0. diff --git a/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypass.go b/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypass.go index 792994785e..70ddeaad3e 100644 --- a/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -18,6 +18,7 @@ // tag is deprecated and thus should not be used. // Go versions prior to 1.4 are disabled because they use a different layout // for interfaces which make the implementation of unsafeReflectValue more complex. +//go:build !js && !appengine && !safe && !disableunsafe && go1.4 // +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew diff --git a/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 205c28d68c..5e2d890d6a 100644 --- a/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/tests-extension/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,6 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. +//go:build js || appengine || safe || disableunsafe || !go1.4 // +build js appengine safe disableunsafe !go1.4 package spew diff --git a/tests-extension/vendor/github.com/davecgh/go-spew/spew/config.go b/tests-extension/vendor/github.com/davecgh/go-spew/spew/config.go index 2e3d22f312..161895fc6d 100644 --- a/tests-extension/vendor/github.com/davecgh/go-spew/spew/config.go +++ b/tests-extension/vendor/github.com/davecgh/go-spew/spew/config.go @@ -254,15 +254,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. @@ -295,12 +295,12 @@ func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) // NewDefaultConfig returns a ConfigState with the following default settings. // -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false +// Indent: " " +// MaxDepth: 0 +// DisableMethods: false +// DisablePointerMethods: false +// ContinueOnMethod: false +// SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } diff --git a/tests-extension/vendor/github.com/davecgh/go-spew/spew/doc.go b/tests-extension/vendor/github.com/davecgh/go-spew/spew/doc.go index aacaac6f1e..722e9aa791 100644 --- a/tests-extension/vendor/github.com/davecgh/go-spew/spew/doc.go +++ b/tests-extension/vendor/github.com/davecgh/go-spew/spew/doc.go @@ -21,35 +21,36 @@ debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output (only when using + Dump style) There are two different approaches spew allows for dumping Go data structures: - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt + - Dump style which prints with newlines, customizable indentation, + and additional debug information such as types and all pointer addresses + used to indirect to the final value + - A custom Formatter interface that integrates cleanly with the standard fmt + package and replaces %v, %+v, %#v, and %#+v to provide inline printing + similar to the default %v while providing the additional functionality + outlined above and passing unsupported format verbs such as %x and %q + along to fmt -Quick Start +# Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: + spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) @@ -58,12 +59,13 @@ Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -Configuration Options +# Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available @@ -74,51 +76,52 @@ equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage + + - Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + + - MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + + - DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + + - DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. + Pointer method invocation is enabled by default. + + - DisablePointerAddresses + DisablePointerAddresses specifies whether to disable the printing of + pointer addresses. This is useful when diffing data structures in tests. + + - DisableCapacities + DisableCapacities specifies whether to disable the printing of + capacities for arrays, slices, maps and channels. This is useful when + diffing data structures in tests. + + - ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + + - SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are + supported with other types sorted according to the + reflect.Value.String() output which guarantees display + stability. Natural map order is used by default. + + - SpewKeys + Specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only + considered if SortKeys is true. + +# Dump Usage Simply call spew.Dump with a list of variables you want to dump: @@ -133,7 +136,7 @@ A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) -Sample Dump Output +# Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. @@ -150,13 +153,14 @@ shown here. Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. + ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } -Custom Formatter +# Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The @@ -170,7 +174,7 @@ standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). -Custom Formatter Usage +# Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The @@ -184,15 +188,17 @@ functions have syntax you are most likely already familiar with: See the Index for the full list convenience functions. -Sample Formatter Output +# Sample Formatter Output Double pointer to a uint8: + %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: + %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} @@ -201,7 +207,7 @@ Pointer to circular struct with a uint8 field and a pointer to itself: See the Printf example for details on the setup of variables being shown here. -Errors +# Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information diff --git a/tests-extension/vendor/github.com/davecgh/go-spew/spew/dump.go b/tests-extension/vendor/github.com/davecgh/go-spew/spew/dump.go index f78d89fc1f..8323041a48 100644 --- a/tests-extension/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/tests-extension/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -488,15 +488,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. diff --git a/tests-extension/vendor/github.com/emicklei/go-restful/v3/curly.go b/tests-extension/vendor/github.com/emicklei/go-restful/v3/curly.go index 6fd2bcd5a1..87fd99e1b1 100644 --- a/tests-extension/vendor/github.com/emicklei/go-restful/v3/curly.go +++ b/tests-extension/vendor/github.com/emicklei/go-restful/v3/curly.go @@ -168,7 +168,7 @@ func (c CurlyRouter) computeWebserviceScore(requestTokens []string, routeTokens if matchesToken { score++ // extra score for regex match } - } + } } else { // not a parameter if eachRequestToken != eachRouteToken { diff --git a/tests-extension/vendor/github.com/emicklei/go-restful/v3/doc.go b/tests-extension/vendor/github.com/emicklei/go-restful/v3/doc.go index 69b13057d0..5bdb9bb186 100644 --- a/tests-extension/vendor/github.com/emicklei/go-restful/v3/doc.go +++ b/tests-extension/vendor/github.com/emicklei/go-restful/v3/doc.go @@ -1,7 +1,7 @@ /* Package restful , a lean package for creating REST-style WebServices without magic. -WebServices and Routes +# WebServices and Routes A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls. Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes. @@ -30,14 +30,14 @@ The (*Request, *Response) arguments provide functions for reading information fr See the example https://github.com/emicklei/go-restful/blob/v3/examples/user-resource/restful-user-resource.go with a full implementation. -Regular expression matching Routes +# Regular expression matching Routes A Route parameter can be specified using the format "uri/{var[:regexp]}" or the special version "uri/{var:*}" for matching the tail of the path. For example, /persons/{name:[A-Z][A-Z]} can be used to restrict values for the parameter "name" to only contain capital alphabetic characters. Regular expressions must use the standard Go syntax as described in the regexp package. (https://code.google.com/p/re2/wiki/Syntax) This feature requires the use of a CurlyRouter. -Containers +# Containers A Container holds a collection of WebServices, Filters and a http.ServeMux for multiplexing http requests. Using the statements "restful.Add(...) and restful.Filter(...)" will register WebServices and Filters to the Default Container. @@ -47,7 +47,7 @@ You can create your own Container and create a new http.Server for that particul container := restful.NewContainer() server := &http.Server{Addr: ":8081", Handler: container} -Filters +# Filters A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. You can use filters to perform generic logging, measurement, authentication, redirect, set response headers etc. @@ -60,22 +60,21 @@ Use the following statement to pass the request,response pair to the next filter chain.ProcessFilter(req, resp) -Container Filters +# Container Filters These are processed before any registered WebService. // install a (global) filter for the default container (processed before any webservice) restful.Filter(globalLogging) -WebService Filters +# WebService Filters These are processed before any Route of a WebService. // install a webservice filter (processed before any route) ws.Filter(webserviceLogging).Filter(measureTime) - -Route Filters +# Route Filters These are processed before calling the function associated with the Route. @@ -84,7 +83,7 @@ These are processed before calling the function associated with the Route. See the example https://github.com/emicklei/go-restful/blob/v3/examples/filters/restful-filters.go with full implementations. -Response Encoding +# Response Encoding Two encodings are supported: gzip and deflate. To enable this for all responses: @@ -95,20 +94,20 @@ Alternatively, you can create a Filter that performs the encoding and install it See the example https://github.com/emicklei/go-restful/blob/v3/examples/encoding/restful-encoding-filter.go -OPTIONS support +# OPTIONS support By installing a pre-defined container filter, your Webservice(s) can respond to the OPTIONS Http request. Filter(OPTIONSFilter()) -CORS +# CORS By installing the filter of a CrossOriginResourceSharing (CORS), your WebService(s) can handle CORS requests. cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer} Filter(cors.Filter) -Error Handling +# Error Handling Unexpected things happen. If a request cannot be processed because of a failure, your service needs to tell via the response what happened and why. For this reason HTTP status codes exist and it is important to use the correct code in every exceptional situation. @@ -137,11 +136,11 @@ The request does not have or has an unknown Accept Header set for this operation The request does not have or has an unknown Content-Type Header set for this operation. -ServiceError +# ServiceError In addition to setting the correct (error) Http status code, you can choose to write a ServiceError message on the response. -Performance options +# Performance options This package has several options that affect the performance of your service. It is important to understand them and how you can change it. @@ -156,30 +155,27 @@ Default value is true If content encoding is enabled then the default strategy for getting new gzip/zlib writers and readers is to use a sync.Pool. Because writers are expensive structures, performance is even more improved when using a preloaded cache. You can also inject your own implementation. -Trouble shooting +# Trouble shooting This package has the means to produce detail logging of the complete Http request matching process and filter invocation. Enabling this feature requires you to set an implementation of restful.StdLogger (e.g. log.Logger) instance such as: restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile)) -Logging +# Logging The restful.SetLogger() method allows you to override the logger used by the package. By default restful uses the standard library `log` package and logs to stdout. Different logging packages are supported as long as they conform to `StdLogger` interface defined in the `log` sub-package, writing an adapter for your preferred package is simple. -Resources +# Resources -[project]: https://github.com/emicklei/go-restful +(c) 2012-2015, http://ernestmicklei.com. MIT License +[project]: https://github.com/emicklei/go-restful [examples]: https://github.com/emicklei/go-restful/blob/master/examples - -[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ - +[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ [showcases]: https://github.com/emicklei/mora, https://github.com/emicklei/landskape - -(c) 2012-2015, http://ernestmicklei.com. MIT License */ package restful diff --git a/tests-extension/vendor/github.com/emicklei/go-restful/v3/response.go b/tests-extension/vendor/github.com/emicklei/go-restful/v3/response.go index a41a92cc2c..09fb3c7528 100644 --- a/tests-extension/vendor/github.com/emicklei/go-restful/v3/response.go +++ b/tests-extension/vendor/github.com/emicklei/go-restful/v3/response.go @@ -14,7 +14,7 @@ import ( // DefaultResponseMimeType is DEPRECATED, use DefaultResponseContentType(mime) var DefaultResponseMimeType string -//PrettyPrintResponses controls the indentation feature of XML and JSON serialization +// PrettyPrintResponses controls the indentation feature of XML and JSON serialization var PrettyPrintResponses = true // Response is a wrapper on the actual http ResponseWriter @@ -40,7 +40,8 @@ func NewResponse(httpWriter http.ResponseWriter) *Response { // If Accept header matching fails, fall back to this type. // Valid values are restful.MIME_JSON and restful.MIME_XML // Example: -// restful.DefaultResponseContentType(restful.MIME_JSON) +// +// restful.DefaultResponseContentType(restful.MIME_JSON) func DefaultResponseContentType(mime string) { DefaultResponseMimeType = mime } diff --git a/tests-extension/vendor/github.com/emicklei/go-restful/v3/web_service.go b/tests-extension/vendor/github.com/emicklei/go-restful/v3/web_service.go index 789c4df259..336a0bc2c9 100644 --- a/tests-extension/vendor/github.com/emicklei/go-restful/v3/web_service.go +++ b/tests-extension/vendor/github.com/emicklei/go-restful/v3/web_service.go @@ -188,20 +188,20 @@ func (w *WebService) Route(builder *RouteBuilder) *WebService { // RemoveRoute removes the specified route, looks for something that matches 'path' and 'method' func (w *WebService) RemoveRoute(path, method string) error { - if !w.dynamicRoutes { - return errors.New("dynamic routes are not enabled.") - } - w.routesLock.Lock() - defer w.routesLock.Unlock() - newRoutes := []Route{} - for _, route := range w.routes { - if route.Method == method && route.Path == path { - continue - } - newRoutes = append(newRoutes, route) - } - w.routes = newRoutes - return nil + if !w.dynamicRoutes { + return errors.New("dynamic routes are not enabled.") + } + w.routesLock.Lock() + defer w.routesLock.Unlock() + newRoutes := []Route{} + for _, route := range w.routes { + if route.Method == method && route.Path == path { + continue + } + newRoutes = append(newRoutes, route) + } + w.routes = newRoutes + return nil } // Method creates a new RouteBuilder and initialize its http method diff --git a/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go index 101cedde67..cffd3d0526 100644 --- a/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go +++ b/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go @@ -1,4 +1,6 @@ +//go:build go1.8 // +build go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop diff --git a/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go index e0951df152..c5ae196621 100644 --- a/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go +++ b/tests-extension/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go @@ -1,4 +1,6 @@ +//go:build !go1.8 // +build !go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop diff --git a/tests-extension/vendor/github.com/ghodss/yaml/fields.go b/tests-extension/vendor/github.com/ghodss/yaml/fields.go index 5860074026..5e36e56a1f 100644 --- a/tests-extension/vendor/github.com/ghodss/yaml/fields.go +++ b/tests-extension/vendor/github.com/ghodss/yaml/fields.go @@ -347,8 +347,9 @@ const ( // 4) simpleLetterEqualFold, no specials, no non-letters. // // The letters S and K are special because they map to 3 runes, not just 2: -// * S maps to s and to U+017F 'ſ' Latin small letter long s -// * k maps to K and to U+212A 'K' Kelvin sign +// - S maps to s and to U+017F 'ſ' Latin small letter long s +// - k maps to K and to U+212A 'K' Kelvin sign +// // See http://play.golang.org/p/tTxjOc0OGo // // The returned function is specialized for matching against s and diff --git a/tests-extension/vendor/github.com/ghodss/yaml/yaml.go b/tests-extension/vendor/github.com/ghodss/yaml/yaml.go index 4fb4054a8b..70edc4b3d8 100644 --- a/tests-extension/vendor/github.com/ghodss/yaml/yaml.go +++ b/tests-extension/vendor/github.com/ghodss/yaml/yaml.go @@ -64,12 +64,12 @@ func JSONToYAML(j []byte) ([]byte, error) { // this method should be a no-op. // // Things YAML can do that are not supported by JSON: -// * In YAML you can have binary and null keys in your maps. These are invalid -// in JSON. (int and float keys are converted to strings.) -// * Binary data in YAML with the !!binary tag is not supported. If you want to -// use binary data with this library, encode the data as base64 as usual but do -// not use the !!binary tag in your YAML. This will ensure the original base64 -// encoded data makes it all the way through to the JSON. +// - In YAML you can have binary and null keys in your maps. These are invalid +// in JSON. (int and float keys are converted to strings.) +// - Binary data in YAML with the !!binary tag is not supported. If you want to +// use binary data with this library, encode the data as base64 as usual but do +// not use the !!binary tag in your YAML. This will ensure the original base64 +// encoded data makes it all the way through to the JSON. func YAMLToJSON(y []byte) ([]byte, error) { return yamlToJSON(y, nil) } diff --git a/tests-extension/vendor/github.com/go-task/slim-sprig/v3/functions.go b/tests-extension/vendor/github.com/go-task/slim-sprig/v3/functions.go index 5ea74f8993..32a3b07462 100644 --- a/tests-extension/vendor/github.com/go-task/slim-sprig/v3/functions.go +++ b/tests-extension/vendor/github.com/go-task/slim-sprig/v3/functions.go @@ -18,8 +18,7 @@ import ( // // Use this to pass the functions into the template engine: // -// tpl := template.New("foo").Funcs(sprig.FuncMap())) -// +// tpl := template.New("foo").Funcs(sprig.FuncMap())) func FuncMap() template.FuncMap { return HtmlFuncMap() } diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/conn_other.go b/tests-extension/vendor/github.com/godbus/dbus/v5/conn_other.go index 90289ca85a..94ff6576ff 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/conn_other.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/conn_other.go @@ -1,3 +1,4 @@ +//go:build !darwin // +build !darwin package dbus @@ -42,10 +43,10 @@ func getSessionBusPlatformAddress() (string, error) { // It tries different techniques employed by different operating systems, // returning the first valid address it finds, or an empty string. // -// * /run/user//bus if this exists, it *is* the bus socket. present on -// Ubuntu 18.04 -// * /run/user//dbus-session: if this exists, it can be parsed for the bus -// address. present on Ubuntu 16.04 +// - /run/user//bus if this exists, it *is* the bus socket. present on +// Ubuntu 18.04 +// - /run/user//dbus-session: if this exists, it can be parsed for the bus +// address. present on Ubuntu 16.04 // // See https://dbus.freedesktop.org/doc/dbus-launch.1.html func tryDiscoverDbusSessionBusAddress() string { diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/conn_unix.go b/tests-extension/vendor/github.com/godbus/dbus/v5/conn_unix.go index 58aee7d2af..1a0daa6566 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/conn_unix.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/conn_unix.go @@ -1,4 +1,5 @@ -//+build !windows,!solaris,!darwin +//go:build !windows && !solaris && !darwin +// +build !windows,!solaris,!darwin package dbus diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/conn_windows.go b/tests-extension/vendor/github.com/godbus/dbus/v5/conn_windows.go index 4291e4519c..0515dd003a 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/conn_windows.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/conn_windows.go @@ -1,4 +1,5 @@ -//+build windows +//go:build windows +// +build windows package dbus diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/default_handler.go b/tests-extension/vendor/github.com/godbus/dbus/v5/default_handler.go index 13132c6b47..7ea7e75e69 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/default_handler.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/default_handler.go @@ -18,9 +18,9 @@ func newIntrospectIntf(h *defaultHandler) *exportedIntf { return newExportedIntf(methods, true) } -//NewDefaultHandler returns an instance of the default -//call handler. This is useful if you want to implement only -//one of the two handlers but not both. +// NewDefaultHandler returns an instance of the default +// call handler. This is useful if you want to implement only +// one of the two handlers but not both. // // Deprecated: this is the default value, don't use it, it will be unexported. func NewDefaultHandler() *defaultHandler { @@ -242,9 +242,9 @@ func (obj *exportedIntf) isFallbackInterface() bool { return obj.includeSubtree } -//NewDefaultSignalHandler returns an instance of the default -//signal handler. This is useful if you want to implement only -//one of the two handlers but not both. +// NewDefaultSignalHandler returns an instance of the default +// signal handler. This is useful if you want to implement only +// one of the two handlers but not both. // // Deprecated: this is the default value, don't use it, it will be unexported. func NewDefaultSignalHandler() *defaultSignalHandler { diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/doc.go b/tests-extension/vendor/github.com/godbus/dbus/v5/doc.go index 8f25a00d61..09eedc71e6 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/doc.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/doc.go @@ -7,7 +7,7 @@ on remote objects and emit or receive signals. Using the Export method, you can arrange D-Bus methods calls to be directly translated to method calls on a Go value. -Conversion Rules +# Conversion Rules For outgoing messages, Go types are automatically converted to the corresponding D-Bus types. See the official specification at @@ -15,25 +15,25 @@ https://dbus.freedesktop.org/doc/dbus-specification.html#type-system for more information on the D-Bus type system. The following types are directly encoded as their respective D-Bus equivalents: - Go type | D-Bus type - ------------+----------- - byte | BYTE - bool | BOOLEAN - int16 | INT16 - uint16 | UINT16 - int | INT32 - uint | UINT32 - int32 | INT32 - uint32 | UINT32 - int64 | INT64 - uint64 | UINT64 - float64 | DOUBLE - string | STRING - ObjectPath | OBJECT_PATH - Signature | SIGNATURE - Variant | VARIANT - interface{} | VARIANT - UnixFDIndex | UNIX_FD + Go type | D-Bus type + ------------+----------- + byte | BYTE + bool | BOOLEAN + int16 | INT16 + uint16 | UINT16 + int | INT32 + uint | UINT32 + int32 | INT32 + uint32 | UINT32 + int64 | INT64 + uint64 | UINT64 + float64 | DOUBLE + string | STRING + ObjectPath | OBJECT_PATH + Signature | SIGNATURE + Variant | VARIANT + interface{} | VARIANT + UnixFDIndex | UNIX_FD Slices and arrays encode as ARRAYs of their element type. @@ -57,7 +57,7 @@ of STRUCTs. Incoming STRUCTS are represented as a slice of empty interfaces containing the struct fields in the correct order. The Store function can be used to convert such values to Go structs. -Unix FD passing +# Unix FD passing Handling Unix file descriptors deserves special mention. To use them, you should first check that they are supported on a connection by calling SupportsUnixFDs. @@ -66,6 +66,5 @@ UnixFD's to messages that are accompanied by the given file descriptors with the UnixFD values being substituted by the correct indices. Similarly, the indices of incoming messages are automatically resolved. It shouldn't be necessary to use UnixFDIndex. - */ package dbus diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/sequential_handler.go b/tests-extension/vendor/github.com/godbus/dbus/v5/sequential_handler.go index ef2fcdba17..886b5eb16b 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/sequential_handler.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/sequential_handler.go @@ -93,7 +93,7 @@ func (scd *sequentialSignalChannelData) bufferSignals() { var queue []*Signal for { if len(queue) == 0 { - signal, ok := <- scd.in + signal, ok := <-scd.in if !ok { return } diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go b/tests-extension/vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go index 697739efaf..a61a82084b 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/transport_nonce_tcp.go @@ -1,4 +1,5 @@ -//+build !windows +//go:build !windows +// +build !windows package dbus diff --git a/tests-extension/vendor/github.com/godbus/dbus/v5/transport_unix.go b/tests-extension/vendor/github.com/godbus/dbus/v5/transport_unix.go index 0a8c712ebd..ffccff0c3d 100644 --- a/tests-extension/vendor/github.com/godbus/dbus/v5/transport_unix.go +++ b/tests-extension/vendor/github.com/godbus/dbus/v5/transport_unix.go @@ -1,4 +1,5 @@ -//+build !windows,!solaris +//go:build !windows && !solaris +// +build !windows,!solaris package dbus diff --git a/tests-extension/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/tests-extension/vendor/github.com/gogo/protobuf/gogoproto/doc.go index 081c86fa8e..40f4b7ae37 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/gogoproto/doc.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -35,7 +35,7 @@ Package gogoproto provides extensions for protocol buffers to achieve: - less typing by optionally generating extra helper code. - goprotobuf compatibility -More Canonical Go Structures +# More Canonical Go Structures A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. @@ -59,15 +59,15 @@ for a quicker overview. The following message: - package test; + package test; - import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } Will generate a go struct which looks a lot like this: @@ -120,12 +120,12 @@ This is typically useful when working with a protocol buffer that was designed b Gogoprotobuf also has some more subtle changes, these could be changed back: - the generated package name for imports do not have the extra /filename.pb, - but are actually the imports specified in the .proto file. + but are actually the imports specified in the .proto file. Gogoprotobuf also has lost some features which should be brought back with time: - Marshalling and unmarshalling with reflect and without the unsafe package, - this requires work in pointer_reflect.go + this requires work in pointer_reflect.go Why does nullable break protocol buffer specifications: @@ -152,7 +152,7 @@ The enumprefix, getters and stringer extensions can be used to remove some of th Less Typing and Peace of Mind is explained in their specific plugin folders godoc: - - github.com/gogo/protobuf/plugin/ + - github.com/gogo/protobuf/plugin/ If you do not use any of these extension the code that is generated will be the same as if goprotobuf has generated it. @@ -164,6 +164,5 @@ The most complete way to see examples is to look at Gogoprototest is a seperate project, because we want to keep gogoprotobuf independent of goprotobuf, but we still want to test it thoroughly. - */ package gogoproto diff --git a/tests-extension/vendor/github.com/gogo/protobuf/proto/lib.go b/tests-extension/vendor/github.com/gogo/protobuf/proto/lib.go index 80db1c155b..10eec0d0ee 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/proto/lib.go @@ -39,35 +39,35 @@ for a protocol buffer variable v: - Names are turned from camel_case to CamelCase for export. - There are no methods on v to set fields; just treat - them as structure fields. + them as structure fields. - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. + and return the field's default value if unset. + The getters work even if the receiver is a nil message. - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. + All desired fields must be set before marshaling. - A Reset() method will restore a protobuf struct to its zero state. - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. + That is, optional or required field int32 f becomes F *int32. - Repeated fields are slices. - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field + msg.Foo = proto.String("hello") // set field - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. + the surrounding message type. - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. + with distinguished wrapper types for each possible field value. - Marshal and Unmarshal are functions to encode and decode the wire format. When the .proto file specifies `syntax="proto3"`, there are some differences: diff --git a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go index b6cad90834..461d58218a 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -29,6 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build purego || appengine || js // +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. diff --git a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go index 7ffd3c29d9..d6e07e2f71 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build purego || appengine || js // +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. diff --git a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go index d55a335d94..c998399ba7 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -29,6 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build !purego && !appengine && !js // +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. diff --git a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go index aca8eed02a..57a1496565 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build !purego && !appengine && !js // +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. diff --git a/tests-extension/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/tests-extension/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go index 937229386a..7c3e9e000e 100644 --- a/tests-extension/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go +++ b/tests-extension/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -2004,12 +2004,14 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // makeUnmarshalOneof makes an unmarshaler for oneof fields. // for: -// message Msg { -// oneof F { -// int64 X = 1; -// float64 Y = 2; -// } -// } +// +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// // typ is the type of the concrete entry for a oneof case (e.g. Msg_X). // ityp is the interface type of the oneof field (e.g. isMsg_F). // unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). diff --git a/tests-extension/vendor/github.com/google/cel-go/common/types/pb/equal.go b/tests-extension/vendor/github.com/google/cel-go/common/types/pb/equal.go index 76893d85ea..275a2a61c9 100644 --- a/tests-extension/vendor/github.com/google/cel-go/common/types/pb/equal.go +++ b/tests-extension/vendor/github.com/google/cel-go/common/types/pb/equal.go @@ -29,10 +29,10 @@ import ( // // - Messages must share the same instance of the type descriptor // - Known set fields are compared using semantics equality -// - Bytes are compared using bytes.Equal -// - Scalar values are compared with operator == -// - List and map types are equal if they have the same length and all elements are equal -// - Messages are equal if they share the same descriptor and all set fields are equal +// - Bytes are compared using bytes.Equal +// - Scalar values are compared with operator == +// - List and map types are equal if they have the same length and all elements are equal +// - Messages are equal if they share the same descriptor and all set fields are equal // - Unknown fields are compared using byte equality // - NaN values are not equal to each other // - google.protobuf.Any values are unpacked before comparison diff --git a/tests-extension/vendor/github.com/google/gnostic-models/jsonschema/base.go b/tests-extension/vendor/github.com/google/gnostic-models/jsonschema/base.go index 5fcc4885a0..a01b1b0d63 100644 --- a/tests-extension/vendor/github.com/google/gnostic-models/jsonschema/base.go +++ b/tests-extension/vendor/github.com/google/gnostic-models/jsonschema/base.go @@ -20,9 +20,9 @@ import ( "encoding/base64" ) -func baseSchemaBytes() ([]byte, error){ +func baseSchemaBytes() ([]byte, error) { return base64.StdEncoding.DecodeString( -`ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi + `ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi JHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA0L3NjaGVtYSMiLAogICAgImRl c2NyaXB0aW9uIjogIkNvcmUgc2NoZW1hIG1ldGEtc2NoZW1hIiwKICAgICJkZWZpbml0aW9ucyI6IHsK ICAgICAgICAic2NoZW1hQXJyYXkiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImFycmF5IiwKICAgICAg @@ -94,4 +94,5 @@ YXkiIH0sCiAgICAgICAgImFueU9mIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NjaGVtYUFycmF5 IiB9LAogICAgICAgICJvbmVPZiI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIg fSwKICAgICAgICAibm90IjogeyAiJHJlZiI6ICIjIiB9CiAgICB9LAogICAgImRlcGVuZGVuY2llcyI6 IHsKICAgICAgICAiZXhjbHVzaXZlTWF4aW11bSI6IFsgIm1heGltdW0iIF0sCiAgICAgICAgImV4Y2x1 -c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`)} +c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`) +} diff --git a/tests-extension/vendor/github.com/google/uuid/dce.go b/tests-extension/vendor/github.com/google/uuid/dce.go index fa820b9d30..9302a1c1bb 100644 --- a/tests-extension/vendor/github.com/google/uuid/dce.go +++ b/tests-extension/vendor/github.com/google/uuid/dce.go @@ -42,7 +42,7 @@ func NewDCESecurity(domain Domain, id uint32) (UUID, error) { // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // -// NewDCESecurity(Person, uint32(os.Getuid())) +// NewDCESecurity(Person, uint32(os.Getuid())) func NewDCEPerson() (UUID, error) { return NewDCESecurity(Person, uint32(os.Getuid())) } @@ -50,7 +50,7 @@ func NewDCEPerson() (UUID, error) { // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // -// NewDCESecurity(Group, uint32(os.Getgid())) +// NewDCESecurity(Group, uint32(os.Getgid())) func NewDCEGroup() (UUID, error) { return NewDCESecurity(Group, uint32(os.Getgid())) } diff --git a/tests-extension/vendor/github.com/google/uuid/hash.go b/tests-extension/vendor/github.com/google/uuid/hash.go index dc60082d3b..cee37578b3 100644 --- a/tests-extension/vendor/github.com/google/uuid/hash.go +++ b/tests-extension/vendor/github.com/google/uuid/hash.go @@ -45,7 +45,7 @@ func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(md5.New(), space, data, 3) +// NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } @@ -53,7 +53,7 @@ func NewMD5(space UUID, data []byte) UUID { // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(sha1.New(), space, data, 5) +// NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } diff --git a/tests-extension/vendor/github.com/google/uuid/node_js.go b/tests-extension/vendor/github.com/google/uuid/node_js.go index b2a0bc8711..f745d7017f 100644 --- a/tests-extension/vendor/github.com/google/uuid/node_js.go +++ b/tests-extension/vendor/github.com/google/uuid/node_js.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build js // +build js package uuid diff --git a/tests-extension/vendor/github.com/google/uuid/node_net.go b/tests-extension/vendor/github.com/google/uuid/node_net.go index 0cbbcddbd6..e91358f7d9 100644 --- a/tests-extension/vendor/github.com/google/uuid/node_net.go +++ b/tests-extension/vendor/github.com/google/uuid/node_net.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !js // +build !js package uuid diff --git a/tests-extension/vendor/github.com/google/uuid/null.go b/tests-extension/vendor/github.com/google/uuid/null.go index d7fcbf2865..06ecf9de2a 100644 --- a/tests-extension/vendor/github.com/google/uuid/null.go +++ b/tests-extension/vendor/github.com/google/uuid/null.go @@ -17,15 +17,14 @@ var jsonNull = []byte("null") // NullUUID implements the SQL driver.Scanner interface so // it can be used as a scan destination: // -// var u uuid.NullUUID -// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) -// ... -// if u.Valid { -// // use u.UUID -// } else { -// // NULL value -// } -// +// var u uuid.NullUUID +// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) +// ... +// if u.Valid { +// // use u.UUID +// } else { +// // NULL value +// } type NullUUID struct { UUID UUID Valid bool // Valid is true if UUID is not NULL diff --git a/tests-extension/vendor/github.com/google/uuid/uuid.go b/tests-extension/vendor/github.com/google/uuid/uuid.go index 5232b48678..1051192bc5 100644 --- a/tests-extension/vendor/github.com/google/uuid/uuid.go +++ b/tests-extension/vendor/github.com/google/uuid/uuid.go @@ -187,10 +187,12 @@ func Must(uuid UUID, err error) UUID { } // Validate returns an error if s is not a properly formatted UUID in one of the following formats: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// // It returns an error if the format is invalid, otherwise nil. func Validate(s string) error { switch len(s) { diff --git a/tests-extension/vendor/github.com/google/uuid/version4.go b/tests-extension/vendor/github.com/google/uuid/version4.go index 7697802e4d..62ac273815 100644 --- a/tests-extension/vendor/github.com/google/uuid/version4.go +++ b/tests-extension/vendor/github.com/google/uuid/version4.go @@ -9,7 +9,7 @@ import "io" // New creates a new random UUID or panics. New is equivalent to // the expression // -// uuid.Must(uuid.NewRandom()) +// uuid.Must(uuid.NewRandom()) func New() UUID { return Must(NewRandom()) } @@ -17,7 +17,7 @@ func New() UUID { // NewString creates a new random UUID and returns it as a string or panics. // NewString is equivalent to the expression // -// uuid.New().String() +// uuid.New().String() func NewString() string { return Must(NewRandom()).String() } @@ -31,11 +31,11 @@ func NewString() string { // // A note about uniqueness derived from the UUID Wikipedia entry: // -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. func NewRandom() (UUID, error) { if !poolEnabled { return NewRandomFromReader(rander) diff --git a/tests-extension/vendor/github.com/gorilla/websocket/doc.go b/tests-extension/vendor/github.com/gorilla/websocket/doc.go index 8db0cef95a..677a827201 100644 --- a/tests-extension/vendor/github.com/gorilla/websocket/doc.go +++ b/tests-extension/vendor/github.com/gorilla/websocket/doc.go @@ -4,40 +4,40 @@ // Package websocket implements the WebSocket protocol defined in RFC 6455. // -// Overview +// # Overview // // The Conn type represents a WebSocket connection. A server application calls // the Upgrader.Upgrade method from an HTTP request handler to get a *Conn: // -// var upgrader = websocket.Upgrader{ -// ReadBufferSize: 1024, -// WriteBufferSize: 1024, -// } +// var upgrader = websocket.Upgrader{ +// ReadBufferSize: 1024, +// WriteBufferSize: 1024, +// } // -// func handler(w http.ResponseWriter, r *http.Request) { -// conn, err := upgrader.Upgrade(w, r, nil) -// if err != nil { -// log.Println(err) -// return -// } -// ... Use conn to send and receive messages. -// } +// func handler(w http.ResponseWriter, r *http.Request) { +// conn, err := upgrader.Upgrade(w, r, nil) +// if err != nil { +// log.Println(err) +// return +// } +// ... Use conn to send and receive messages. +// } // // Call the connection's WriteMessage and ReadMessage methods to send and // receive messages as a slice of bytes. This snippet of code shows how to echo // messages using these methods: // -// for { -// messageType, p, err := conn.ReadMessage() -// if err != nil { -// log.Println(err) -// return -// } -// if err := conn.WriteMessage(messageType, p); err != nil { -// log.Println(err) -// return -// } -// } +// for { +// messageType, p, err := conn.ReadMessage() +// if err != nil { +// log.Println(err) +// return +// } +// if err := conn.WriteMessage(messageType, p); err != nil { +// log.Println(err) +// return +// } +// } // // In above snippet of code, p is a []byte and messageType is an int with value // websocket.BinaryMessage or websocket.TextMessage. @@ -49,24 +49,24 @@ // method to get an io.Reader and read until io.EOF is returned. This snippet // shows how to echo messages using the NextWriter and NextReader methods: // -// for { -// messageType, r, err := conn.NextReader() -// if err != nil { -// return -// } -// w, err := conn.NextWriter(messageType) -// if err != nil { -// return err -// } -// if _, err := io.Copy(w, r); err != nil { -// return err -// } -// if err := w.Close(); err != nil { -// return err -// } -// } -// -// Data Messages +// for { +// messageType, r, err := conn.NextReader() +// if err != nil { +// return +// } +// w, err := conn.NextWriter(messageType) +// if err != nil { +// return err +// } +// if _, err := io.Copy(w, r); err != nil { +// return err +// } +// if err := w.Close(); err != nil { +// return err +// } +// } +// +// # Data Messages // // The WebSocket protocol distinguishes between text and binary data messages. // Text messages are interpreted as UTF-8 encoded text. The interpretation of @@ -80,7 +80,7 @@ // It is the application's responsibility to ensure that text messages are // valid UTF-8 encoded text. // -// Control Messages +// # Control Messages // // The WebSocket protocol defines three types of control messages: close, ping // and pong. Call the connection WriteControl, WriteMessage or NextWriter @@ -110,16 +110,16 @@ // in messages from the peer, then the application should start a goroutine to // read and discard messages from the peer. A simple example is: // -// func readLoop(c *websocket.Conn) { -// for { -// if _, _, err := c.NextReader(); err != nil { -// c.Close() -// break -// } -// } -// } +// func readLoop(c *websocket.Conn) { +// for { +// if _, _, err := c.NextReader(); err != nil { +// c.Close() +// break +// } +// } +// } // -// Concurrency +// # Concurrency // // Connections support one concurrent reader and one concurrent writer. // @@ -133,7 +133,7 @@ // The Close and WriteControl methods can be called concurrently with all other // methods. // -// Origin Considerations +// # Origin Considerations // // Web browsers allow Javascript applications to open a WebSocket connection to // any host. It's up to the server to enforce an origin policy using the Origin @@ -151,7 +151,7 @@ // checking. The application is responsible for checking the Origin header // before calling the Upgrade function. // -// Buffers +// # Buffers // // Connections buffer network input and output to reduce the number // of system calls when reading or writing messages. @@ -198,16 +198,16 @@ // buffer size has a reduced impact on total memory use and has the benefit of // reducing system calls and frame overhead. // -// Compression EXPERIMENTAL +// # Compression EXPERIMENTAL // // Per message compression extensions (RFC 7692) are experimentally supported // by this package in a limited capacity. Setting the EnableCompression option // to true in Dialer or Upgrader will attempt to negotiate per message deflate // support. // -// var upgrader = websocket.Upgrader{ -// EnableCompression: true, -// } +// var upgrader = websocket.Upgrader{ +// EnableCompression: true, +// } // // If compression was successfully negotiated with the connection's peer, any // message received in compressed form will be automatically decompressed. @@ -216,7 +216,7 @@ // Per message compression of messages written to a connection can be enabled // or disabled by calling the corresponding Conn method: // -// conn.EnableWriteCompression(false) +// conn.EnableWriteCompression(false) // // Currently this package does not support compression with "context takeover". // This means that messages must be compressed and decompressed in isolation, diff --git a/tests-extension/vendor/github.com/gorilla/websocket/server.go b/tests-extension/vendor/github.com/gorilla/websocket/server.go index 02ea01fdcd..bd734f0163 100644 --- a/tests-extension/vendor/github.com/gorilla/websocket/server.go +++ b/tests-extension/vendor/github.com/gorilla/websocket/server.go @@ -370,4 +370,3 @@ func (b *brNetConn) Read(p []byte) (n int, err error) { func (b *brNetConn) NetConn() net.Conn { return b.Conn } - diff --git a/tests-extension/vendor/github.com/json-iterator/go/iter_float.go b/tests-extension/vendor/github.com/json-iterator/go/iter_float.go index 8a3d8b6fb4..caf16feec8 100644 --- a/tests-extension/vendor/github.com/json-iterator/go/iter_float.go +++ b/tests-extension/vendor/github.com/json-iterator/go/iter_float.go @@ -66,7 +66,7 @@ func (iter *Iterator) ReadBigInt() (ret *big.Int) { return ret } -//ReadFloat32 read float32 +// ReadFloat32 read float32 func (iter *Iterator) ReadFloat32() (ret float32) { c := iter.nextToken() if c == '-' { diff --git a/tests-extension/vendor/github.com/json-iterator/go/iter_skip_sloppy.go b/tests-extension/vendor/github.com/json-iterator/go/iter_skip_sloppy.go index 9303de41e4..3d993f2773 100644 --- a/tests-extension/vendor/github.com/json-iterator/go/iter_skip_sloppy.go +++ b/tests-extension/vendor/github.com/json-iterator/go/iter_skip_sloppy.go @@ -1,4 +1,5 @@ -//+build jsoniter_sloppy +//go:build jsoniter_sloppy +// +build jsoniter_sloppy package jsoniter diff --git a/tests-extension/vendor/github.com/json-iterator/go/iter_skip_strict.go b/tests-extension/vendor/github.com/json-iterator/go/iter_skip_strict.go index 6cf66d0438..f1ad6591bb 100644 --- a/tests-extension/vendor/github.com/json-iterator/go/iter_skip_strict.go +++ b/tests-extension/vendor/github.com/json-iterator/go/iter_skip_strict.go @@ -1,4 +1,5 @@ -//+build !jsoniter_sloppy +//go:build !jsoniter_sloppy +// +build !jsoniter_sloppy package jsoniter diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/debug_development.go b/tests-extension/vendor/github.com/karrick/godirwalk/debug_development.go index 6e1cb0bf7e..221cb35338 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/debug_development.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/debug_development.go @@ -1,3 +1,4 @@ +//go:build godirwalk_debug // +build godirwalk_debug package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/debug_release.go b/tests-extension/vendor/github.com/karrick/godirwalk/debug_release.go index 986178731f..4a57b65ea9 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/debug_release.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/debug_release.go @@ -1,3 +1,4 @@ +//go:build !godirwalk_debug // +build !godirwalk_debug package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/dirent.go b/tests-extension/vendor/github.com/karrick/godirwalk/dirent.go index 38e141ba6b..58e644bde2 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/dirent.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/dirent.go @@ -75,8 +75,8 @@ func (de Dirent) IsDevice() bool { return de.modeType&os.ModeDevice != 0 } // runtime already gives us architecture independent file modes, as discussed in // `os/types.go`: // -// Go's runtime FileMode type has same definition on all systems, so that -// information about files can be moved from one system to another portably. +// Go's runtime FileMode type has same definition on all systems, so that +// information about files can be moved from one system to another portably. func (de Dirent) ModeType() os.FileMode { return de.modeType } // Name returns the base name of the file system entry. diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/doc.go b/tests-extension/vendor/github.com/karrick/godirwalk/doc.go index 440aa82a3a..8e30f23b36 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/doc.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/doc.go @@ -11,32 +11,32 @@ In short, why do I use this library? * It's more flexible than `filepath.Walk`. -USAGE +# USAGE This library will normalize the provided top level directory name based on the os-specific path separator by calling `filepath.Clean` on its first argument. However it always provides the pathname created by using the correct os-specific path separator when invoking the provided callback function. - dirname := "some/directory/root" - err := godirwalk.Walk(dirname, &godirwalk.Options{ - Callback: func(osPathname string, de *godirwalk.Dirent) error { - fmt.Printf("%s %s\n", de.ModeType(), osPathname) - return nil - }, - }) + dirname := "some/directory/root" + err := godirwalk.Walk(dirname, &godirwalk.Options{ + Callback: func(osPathname string, de *godirwalk.Dirent) error { + fmt.Printf("%s %s\n", de.ModeType(), osPathname) + return nil + }, + }) This library not only provides functions for traversing a file system directory tree, but also for obtaining a list of immediate descendants of a particular directory, typically much more quickly than using `os.ReadDir` or `os.ReadDirnames`. - scratchBuffer := make([]byte, godirwalk.MinimumScratchBufferSize) + scratchBuffer := make([]byte, godirwalk.MinimumScratchBufferSize) - names, err := godirwalk.ReadDirnames("some/directory", scratchBuffer) - // ... + names, err := godirwalk.ReadDirnames("some/directory", scratchBuffer) + // ... - entries, err := godirwalk.ReadDirents("another/directory", scratchBuffer) - // ... + entries, err := godirwalk.ReadDirents("another/directory", scratchBuffer) + // ... */ package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/inoWithFileno.go b/tests-extension/vendor/github.com/karrick/godirwalk/inoWithFileno.go index 1dc04a717a..3232bca013 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/inoWithFileno.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/inoWithFileno.go @@ -1,3 +1,4 @@ +//go:build dragonfly || freebsd || openbsd || netbsd // +build dragonfly freebsd openbsd netbsd package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/inoWithIno.go b/tests-extension/vendor/github.com/karrick/godirwalk/inoWithIno.go index 842a6662d8..09f5fad75e 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/inoWithIno.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/inoWithIno.go @@ -1,3 +1,4 @@ +//go:build aix || darwin || linux || nacl || solaris // +build aix darwin linux nacl solaris package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithType.go b/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithType.go index 7890e7761b..04958a16a6 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithType.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithType.go @@ -1,3 +1,4 @@ +//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd // +build darwin dragonfly freebsd linux netbsd openbsd package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go b/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go index 5299392ee9..0281ffbe17 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/modeTypeWithoutType.go @@ -1,3 +1,4 @@ +//go:build aix || js || nacl || solaris // +build aix js nacl solaris package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/nameWithNamlen.go b/tests-extension/vendor/github.com/karrick/godirwalk/nameWithNamlen.go index 2c0231eea7..8ae67caa00 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/nameWithNamlen.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/nameWithNamlen.go @@ -1,3 +1,4 @@ +//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd // +build aix darwin dragonfly freebsd netbsd openbsd package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go b/tests-extension/vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go index f776fbc760..ac38d0bd1b 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/nameWithoutNamlen.go @@ -1,3 +1,4 @@ +//go:build nacl || linux || js || solaris // +build nacl linux js solaris package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/readdir.go b/tests-extension/vendor/github.com/karrick/godirwalk/readdir.go index c8fa8155e3..ac4da377e7 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/readdir.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/readdir.go @@ -11,14 +11,14 @@ package godirwalk // significantly better performance if you allocate a scratch buffer and use it // each time you call this function. // -// children, err := godirwalk.ReadDirents(osDirname, nil) -// if err != nil { -// return nil, errors.Wrap(err, "cannot get list of directory children") -// } -// sort.Sort(children) -// for _, child := range children { -// fmt.Printf("%s %s\n", child.ModeType, child.Name) -// } +// children, err := godirwalk.ReadDirents(osDirname, nil) +// if err != nil { +// return nil, errors.Wrap(err, "cannot get list of directory children") +// } +// sort.Sort(children) +// for _, child := range children { +// fmt.Printf("%s %s\n", child.ModeType, child.Name) +// } func ReadDirents(osDirname string, scratchBuffer []byte) (Dirents, error) { return readDirents(osDirname, scratchBuffer) } @@ -40,14 +40,14 @@ func ReadDirents(osDirname string, scratchBuffer []byte) (Dirents, error) { // ReadDirents directly, rather than calling this function, then looping over // the results and calling os.Stat or os.LStat for each entry. // -// children, err := godirwalk.ReadDirnames(osDirname, nil) -// if err != nil { -// return nil, errors.Wrap(err, "cannot get list of directory children") -// } -// sort.Strings(children) -// for _, child := range children { -// fmt.Printf("%s\n", child) -// } +// children, err := godirwalk.ReadDirnames(osDirname, nil) +// if err != nil { +// return nil, errors.Wrap(err, "cannot get list of directory children") +// } +// sort.Strings(children) +// for _, child := range children { +// fmt.Printf("%s\n", child) +// } func ReadDirnames(osDirname string, scratchBuffer []byte) ([]string, error) { return readDirnames(osDirname, scratchBuffer) } diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/readdir_unix.go b/tests-extension/vendor/github.com/karrick/godirwalk/readdir_unix.go index a993038ba2..b392f1119b 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/readdir_unix.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/readdir_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/readdir_windows.go b/tests-extension/vendor/github.com/karrick/godirwalk/readdir_windows.go index 7dd76cbc35..ad5377b56c 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/readdir_windows.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/readdir_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go b/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go index baeefcee3a..9d1184e085 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromNamlen.go @@ -1,3 +1,4 @@ +//go:build dragonfly // +build dragonfly package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromReclen.go b/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromReclen.go index 99be34d871..e94eb42f4f 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromReclen.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/reclenFromReclen.go @@ -1,3 +1,4 @@ +//go:build nacl || linux || js || solaris || aix || darwin || freebsd || netbsd || openbsd // +build nacl linux js solaris aix darwin freebsd netbsd openbsd package godirwalk diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/scandir_unix.go b/tests-extension/vendor/github.com/karrick/godirwalk/scandir_unix.go index 654039bd2b..92cee074f1 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/scandir_unix.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/scandir_unix.go @@ -28,29 +28,29 @@ type Scanner struct { // caller must invoke either the Scanner's Close or Err method after // it has completed scanning a directory. // -// scanner, err := godirwalk.NewScanner(dirname) -// if err != nil { -// fatal("cannot scan directory: %s", err) -// } +// scanner, err := godirwalk.NewScanner(dirname) +// if err != nil { +// fatal("cannot scan directory: %s", err) +// } // -// for scanner.Scan() { -// dirent, err := scanner.Dirent() -// if err != nil { -// warning("cannot get dirent: %s", err) -// continue -// } -// name := dirent.Name() -// if name == "break" { -// break -// } -// if name == "continue" { -// continue -// } -// fmt.Printf("%v %v\n", dirent.ModeType(), dirent.Name()) -// } -// if err := scanner.Err(); err != nil { -// fatal("cannot scan directory: %s", err) -// } +// for scanner.Scan() { +// dirent, err := scanner.Dirent() +// if err != nil { +// warning("cannot get dirent: %s", err) +// continue +// } +// name := dirent.Name() +// if name == "break" { +// break +// } +// if name == "continue" { +// continue +// } +// fmt.Printf("%v %v\n", dirent.ModeType(), dirent.Name()) +// } +// if err := scanner.Err(); err != nil { +// fatal("cannot scan directory: %s", err) +// } func NewScanner(osDirname string) (*Scanner, error) { return NewScannerWithScratchBuffer(osDirname, nil) } diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/scandir_windows.go b/tests-extension/vendor/github.com/karrick/godirwalk/scandir_windows.go index 338e3236ed..895b2bfc40 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/scandir_windows.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/scandir_windows.go @@ -23,29 +23,29 @@ type Scanner struct { // caller must invoke either the Scanner's Close or Err method after // it has completed scanning a directory. // -// scanner, err := godirwalk.NewScanner(dirname) -// if err != nil { -// fatal("cannot scan directory: %s", err) -// } +// scanner, err := godirwalk.NewScanner(dirname) +// if err != nil { +// fatal("cannot scan directory: %s", err) +// } // -// for scanner.Scan() { -// dirent, err := scanner.Dirent() -// if err != nil { -// warning("cannot get dirent: %s", err) -// continue -// } -// name := dirent.Name() -// if name == "break" { -// break -// } -// if name == "continue" { -// continue -// } -// fmt.Printf("%v %v\n", dirent.ModeType(), dirent.Name()) -// } -// if err := scanner.Err(); err != nil { -// fatal("cannot scan directory: %s", err) -// } +// for scanner.Scan() { +// dirent, err := scanner.Dirent() +// if err != nil { +// warning("cannot get dirent: %s", err) +// continue +// } +// name := dirent.Name() +// if name == "break" { +// break +// } +// if name == "continue" { +// continue +// } +// fmt.Printf("%v %v\n", dirent.ModeType(), dirent.Name()) +// } +// if err := scanner.Err(); err != nil { +// fatal("cannot scan directory: %s", err) +// } func NewScanner(osDirname string) (*Scanner, error) { dh, err := os.Open(osDirname) if err != nil { diff --git a/tests-extension/vendor/github.com/karrick/godirwalk/walk.go b/tests-extension/vendor/github.com/karrick/godirwalk/walk.go index 9d0235dfb8..a95aebbd2e 100644 --- a/tests-extension/vendor/github.com/karrick/godirwalk/walk.go +++ b/tests-extension/vendor/github.com/karrick/godirwalk/walk.go @@ -145,16 +145,16 @@ var SkipThis = errors.New("skip this directory entry") // have it skip any file system entry whose full pathname includes a particular // substring, optSkip: // -// func callback1(osPathname string, de *godirwalk.Dirent) error { -// if optSkip != "" && strings.Contains(osPathname, optSkip) { -// if b, err := de.IsDirOrSymlinkToDir(); b == true && err == nil { -// return filepath.SkipDir -// } -// return nil -// } -// // Process file like normal... -// return nil -// } +// func callback1(osPathname string, de *godirwalk.Dirent) error { +// if optSkip != "" && strings.Contains(osPathname, optSkip) { +// if b, err := de.IsDirOrSymlinkToDir(); b == true && err == nil { +// return filepath.SkipDir +// } +// return nil +// } +// // Process file like normal... +// return nil +// } // // This library attempts to eliminate some of that logic boilerplate by // providing a new token error value, SkipThis, which a callback function may @@ -166,13 +166,13 @@ var SkipThis = errors.New("skip this directory entry") // following example callback function has identical behavior as the previous, // but has less boilerplate, and admittedly more simple logic. // -// func callback2(osPathname string, de *godirwalk.Dirent) error { -// if optSkip != "" && strings.Contains(osPathname, optSkip) { -// return godirwalk.SkipThis -// } -// // Process file like normal... -// return nil -// } +// func callback2(osPathname string, de *godirwalk.Dirent) error { +// if optSkip != "" && strings.Contains(osPathname, optSkip) { +// return godirwalk.SkipThis +// } +// // Process file like normal... +// return nil +// } type WalkFunc func(osPathname string, directoryEntry *Dirent) error // Walk walks the file tree rooted at the specified directory, calling the @@ -190,30 +190,30 @@ type WalkFunc func(osPathname string, directoryEntry *Dirent) error // pathname of the file system node that caused the error. The ErrorCallback // function's return value determines the action that Walk will then take. // -// func main() { -// dirname := "." -// if len(os.Args) > 1 { -// dirname = os.Args[1] -// } -// err := godirwalk.Walk(dirname, &godirwalk.Options{ -// Callback: func(osPathname string, de *godirwalk.Dirent) error { -// fmt.Printf("%s %s\n", de.ModeType(), osPathname) -// return nil -// }, -// ErrorCallback: func(osPathname string, err error) godirwalk.ErrorAction { -// // Your program may want to log the error somehow. -// fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) +// func main() { +// dirname := "." +// if len(os.Args) > 1 { +// dirname = os.Args[1] +// } +// err := godirwalk.Walk(dirname, &godirwalk.Options{ +// Callback: func(osPathname string, de *godirwalk.Dirent) error { +// fmt.Printf("%s %s\n", de.ModeType(), osPathname) +// return nil +// }, +// ErrorCallback: func(osPathname string, err error) godirwalk.ErrorAction { +// // Your program may want to log the error somehow. +// fmt.Fprintf(os.Stderr, "ERROR: %s\n", err) // -// // For the purposes of this example, a simple SkipNode will suffice, -// // although in reality perhaps additional logic might be called for. -// return godirwalk.SkipNode -// }, -// }) -// if err != nil { -// fmt.Fprintf(os.Stderr, "%s\n", err) -// os.Exit(1) -// } -// } +// // For the purposes of this example, a simple SkipNode will suffice, +// // although in reality perhaps additional logic might be called for. +// return godirwalk.SkipNode +// }, +// }) +// if err != nil { +// fmt.Fprintf(os.Stderr, "%s\n", err) +// os.Exit(1) +// } +// } func Walk(pathname string, options *Options) error { if options == nil || options.Callback == nil { return errors.New("cannot walk without non-nil options and Callback function") diff --git a/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go b/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go index e68108f868..39459d3250 100644 --- a/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go +++ b/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go @@ -2,8 +2,8 @@ // easyjson_nounsafe nor appengine build tag is set. See README notes // for more details. -//+build !easyjson_nounsafe -//+build !appengine +//go:build !easyjson_nounsafe && !appengine +// +build !easyjson_nounsafe,!appengine package jlexer diff --git a/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go b/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go index 864d1be676..5c24365ccd 100644 --- a/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go +++ b/tests-extension/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go @@ -1,7 +1,8 @@ // This file is included to the build if any of the buildtags below // are defined. Refer to README notes for more details. -//+build easyjson_nounsafe appengine +//go:build easyjson_nounsafe || appengine +// +build easyjson_nounsafe appengine package jlexer diff --git a/tests-extension/vendor/github.com/mistifyio/go-zfs/utils.go b/tests-extension/vendor/github.com/mistifyio/go-zfs/utils.go index c18c2c3dae..c6a09f0cad 100644 --- a/tests-extension/vendor/github.com/mistifyio/go-zfs/utils.go +++ b/tests-extension/vendor/github.com/mistifyio/go-zfs/utils.go @@ -267,10 +267,10 @@ func parseInodeChange(line []string) (*InodeChange, error) { } // example input -//M / /testpool/bar/ -//+ F /testpool/bar/hello.txt -//M / /testpool/bar/hello.txt (+1) -//M / /testpool/bar/hello-hardlink +// M / /testpool/bar/ +// + F /testpool/bar/hello.txt +// M / /testpool/bar/hello.txt (+1) +// M / /testpool/bar/hello-hardlink func parseInodeChanges(lines [][]string) ([]*InodeChange, error) { changes := make([]*InodeChange, len(lines)) diff --git a/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go b/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go index a46f73060d..fa6905531f 100644 --- a/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go +++ b/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_notsolaris.go @@ -1,3 +1,4 @@ +//go:build !solaris // +build !solaris package zfs diff --git a/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_solaris.go b/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_solaris.go index 0a7e90f222..a0ded8d811 100644 --- a/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_solaris.go +++ b/tests-extension/vendor/github.com/mistifyio/go-zfs/utils_solaris.go @@ -1,3 +1,4 @@ +//go:build solaris // +build solaris package zfs diff --git a/tests-extension/vendor/github.com/modern-go/concurrent/go_above_19.go b/tests-extension/vendor/github.com/modern-go/concurrent/go_above_19.go index aeabf8c4f9..7db7019454 100644 --- a/tests-extension/vendor/github.com/modern-go/concurrent/go_above_19.go +++ b/tests-extension/vendor/github.com/modern-go/concurrent/go_above_19.go @@ -1,4 +1,5 @@ -//+build go1.9 +//go:build go1.9 +// +build go1.9 package concurrent diff --git a/tests-extension/vendor/github.com/modern-go/concurrent/go_below_19.go b/tests-extension/vendor/github.com/modern-go/concurrent/go_below_19.go index b9c8df7f41..64544f5b35 100644 --- a/tests-extension/vendor/github.com/modern-go/concurrent/go_below_19.go +++ b/tests-extension/vendor/github.com/modern-go/concurrent/go_below_19.go @@ -1,4 +1,5 @@ -//+build !go1.9 +//go:build !go1.9 +// +build !go1.9 package concurrent diff --git a/tests-extension/vendor/github.com/modern-go/concurrent/log.go b/tests-extension/vendor/github.com/modern-go/concurrent/log.go index 9756fcc75a..4899eed026 100644 --- a/tests-extension/vendor/github.com/modern-go/concurrent/log.go +++ b/tests-extension/vendor/github.com/modern-go/concurrent/log.go @@ -1,13 +1,13 @@ package concurrent import ( - "os" - "log" "io/ioutil" + "log" + "os" ) // ErrorLogger is used to print out error, can be set to writer other than stderr var ErrorLogger = log.New(os.Stderr, "", 0) // InfoLogger is used to print informational message, default to off -var InfoLogger = log.New(ioutil.Discard, "", 0) \ No newline at end of file +var InfoLogger = log.New(ioutil.Discard, "", 0) diff --git a/tests-extension/vendor/github.com/modern-go/concurrent/unbounded_executor.go b/tests-extension/vendor/github.com/modern-go/concurrent/unbounded_executor.go index 05a77dceb1..5ea18eb7bf 100644 --- a/tests-extension/vendor/github.com/modern-go/concurrent/unbounded_executor.go +++ b/tests-extension/vendor/github.com/modern-go/concurrent/unbounded_executor.go @@ -3,11 +3,11 @@ package concurrent import ( "context" "fmt" + "reflect" "runtime" "runtime/debug" "sync" "time" - "reflect" ) // HandlePanic logs goroutine panic by default diff --git a/tests-extension/vendor/github.com/modern-go/reflect2/go_above_118.go b/tests-extension/vendor/github.com/modern-go/reflect2/go_above_118.go index 2b4116f6c9..33c825f6d5 100644 --- a/tests-extension/vendor/github.com/modern-go/reflect2/go_above_118.go +++ b/tests-extension/vendor/github.com/modern-go/reflect2/go_above_118.go @@ -1,4 +1,5 @@ -//+build go1.18 +//go:build go1.18 +// +build go1.18 package reflect2 @@ -8,6 +9,7 @@ import ( // m escapes into the return value, but the caller of mapiterinit // doesn't let the return value escape. +// //go:noescape //go:linkname mapiterinit reflect.mapiterinit func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter) @@ -20,4 +22,4 @@ func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { pKeyRType: type2.pKeyRType, pElemRType: type2.pElemRType, } -} \ No newline at end of file +} diff --git a/tests-extension/vendor/github.com/modern-go/reflect2/go_above_19.go b/tests-extension/vendor/github.com/modern-go/reflect2/go_above_19.go index 974f7685e4..03ccb43c65 100644 --- a/tests-extension/vendor/github.com/modern-go/reflect2/go_above_19.go +++ b/tests-extension/vendor/github.com/modern-go/reflect2/go_above_19.go @@ -1,4 +1,5 @@ -//+build go1.9 +//go:build go1.9 +// +build go1.9 package reflect2 diff --git a/tests-extension/vendor/github.com/modern-go/reflect2/go_below_118.go b/tests-extension/vendor/github.com/modern-go/reflect2/go_below_118.go index 00003dbd7c..092ec5b5d2 100644 --- a/tests-extension/vendor/github.com/modern-go/reflect2/go_below_118.go +++ b/tests-extension/vendor/github.com/modern-go/reflect2/go_below_118.go @@ -1,4 +1,5 @@ -//+build !go1.18 +//go:build !go1.18 +// +build !go1.18 package reflect2 @@ -8,6 +9,7 @@ import ( // m escapes into the return value, but the caller of mapiterinit // doesn't let the return value escape. +// //go:noescape //go:linkname mapiterinit reflect.mapiterinit func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter) @@ -18,4 +20,4 @@ func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { pKeyRType: type2.pKeyRType, pElemRType: type2.pElemRType, } -} \ No newline at end of file +} diff --git a/tests-extension/vendor/github.com/modern-go/reflect2/reflect2.go b/tests-extension/vendor/github.com/modern-go/reflect2/reflect2.go index c43c8b9d62..b0c281fcac 100644 --- a/tests-extension/vendor/github.com/modern-go/reflect2/reflect2.go +++ b/tests-extension/vendor/github.com/modern-go/reflect2/reflect2.go @@ -282,6 +282,7 @@ func likePtrType(typ reflect.Type) bool { // output depends on the input. noescape is inlined and currently // compiles down to zero instructions. // USE CAREFULLY! +// //go:nosplit func NoEscape(p unsafe.Pointer) unsafe.Pointer { x := uintptr(p) diff --git a/tests-extension/vendor/github.com/modern-go/reflect2/type_map.go b/tests-extension/vendor/github.com/modern-go/reflect2/type_map.go index 4b13c3155c..54c8498ef1 100644 --- a/tests-extension/vendor/github.com/modern-go/reflect2/type_map.go +++ b/tests-extension/vendor/github.com/modern-go/reflect2/type_map.go @@ -1,3 +1,4 @@ +//go:build !gccgo // +build !gccgo package reflect2 @@ -9,6 +10,7 @@ import ( ) // typelinks2 for 1.7 ~ +// //go:linkname typelinks2 reflect.typelinks func typelinks2() (sections []unsafe.Pointer, offset [][]int32) diff --git a/tests-extension/vendor/github.com/modern-go/reflect2/unsafe_link.go b/tests-extension/vendor/github.com/modern-go/reflect2/unsafe_link.go index b49f614efc..61849bb426 100644 --- a/tests-extension/vendor/github.com/modern-go/reflect2/unsafe_link.go +++ b/tests-extension/vendor/github.com/modern-go/reflect2/unsafe_link.go @@ -13,6 +13,7 @@ func unsafe_NewArray(rtype unsafe.Pointer, length int) unsafe.Pointer // typedslicecopy copies a slice of elemType values from src to dst, // returning the number of elements copied. +// //go:linkname typedslicecopy reflect.typedslicecopy //go:noescape func typedslicecopy(elemType unsafe.Pointer, dst, src sliceHeader) int diff --git a/tests-extension/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go b/tests-extension/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go index 1b727721e1..fcaee0f049 100644 --- a/tests-extension/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go +++ b/tests-extension/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go @@ -38,10 +38,10 @@ type Monitor struct { // weight of each sample in the exponential moving average (EMA) calculation. // The exact formulas are: // -// sampleTime = currentTime - prevSampleTime -// sampleRate = byteCount / sampleTime -// weight = 1 - exp(-sampleTime/windowSize) -// newRate = weight*sampleRate + (1-weight)*oldRate +// sampleTime = currentTime - prevSampleTime +// sampleRate = byteCount / sampleTime +// weight = 1 - exp(-sampleTime/windowSize) +// newRate = weight*sampleRate + (1-weight)*oldRate // // The default values for sampleRate and windowSize (if <= 0) are 100ms and 1s, // respectively. diff --git a/tests-extension/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go b/tests-extension/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go index 778bfd7c7c..5576890540 100644 --- a/tests-extension/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go +++ b/tests-extension/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows /* diff --git a/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go b/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go index 30c2851a81..9ea845fc3e 100644 --- a/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go +++ b/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/output_interceptor_win.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package internal diff --git a/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go b/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go index 2620fd562d..57375377d2 100644 --- a/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go +++ b/tests-extension/vendor/github.com/onsi/ginkgo/v2/internal/parallel_support/rpc_server.go @@ -25,7 +25,7 @@ type RPCServer struct { handler *ServerHandler } -//Create a new server, automatically selecting a port +// Create a new server, automatically selecting a port func newRPCServer(parallelTotal int, reporter reporters.Reporter) (*RPCServer, error) { listener, err := net.Listen("tcp", "127.0.0.1:0") if err != nil { @@ -37,7 +37,7 @@ func newRPCServer(parallelTotal int, reporter reporters.Reporter) (*RPCServer, e }, nil } -//Start the server. You don't need to `go s.Start()`, just `s.Start()` +// Start the server. You don't need to `go s.Start()`, just `s.Start()` func (server *RPCServer) Start() { rpcServer := rpc.NewServer() rpcServer.RegisterName("Server", server.handler) //register the handler's methods as the server @@ -48,12 +48,12 @@ func (server *RPCServer) Start() { go httpServer.Serve(server.listener) } -//Stop the server +// Stop the server func (server *RPCServer) Close() { server.listener.Close() } -//The address the server can be reached it. Pass this into the `ForwardingReporter`. +// The address the server can be reached it. Pass this into the `ForwardingReporter`. func (server *RPCServer) Address() string { return server.listener.Addr().String() } diff --git a/tests-extension/vendor/github.com/opencontainers/go-digest/digest.go b/tests-extension/vendor/github.com/opencontainers/go-digest/digest.go index 518b5e7154..465996ce6c 100644 --- a/tests-extension/vendor/github.com/opencontainers/go-digest/digest.go +++ b/tests-extension/vendor/github.com/opencontainers/go-digest/digest.go @@ -30,7 +30,7 @@ import ( // // The following is an example of the contents of Digest types: // -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // This allows to abstract the digest behind this type and work only in those // terms. diff --git a/tests-extension/vendor/github.com/opencontainers/go-digest/doc.go b/tests-extension/vendor/github.com/opencontainers/go-digest/doc.go index 83d3a936ca..e2dd44f466 100644 --- a/tests-extension/vendor/github.com/opencontainers/go-digest/doc.go +++ b/tests-extension/vendor/github.com/opencontainers/go-digest/doc.go @@ -19,16 +19,16 @@ // More importantly, it provides tools and wrappers to work with // hash.Hash-based digests with little effort. // -// Basics +// # Basics // // The format of a digest is simply a string with two parts, dubbed the // "algorithm" and the "digest", separated by a colon: // -// : +// : // // An example of a sha256 digest representation follows: // -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // The "algorithm" portion defines both the hashing algorithm used to calculate // the digest and the encoding of the resulting digest, which defaults to "hex" @@ -42,7 +42,7 @@ // obtained, comparisons are cheap, quick and simple to express with the // standard equality operator. // -// Verification +// # Verification // // The main benefit of using the Digest type is simple verification against a // given digest. The Verifier interface, modeled after the stdlib hash.Hash @@ -50,7 +50,7 @@ // writing is complete, calling the Verifier.Verified method will indicate // whether or not the stream of bytes matches the target digest. // -// Missing Features +// # Missing Features // // In addition to the above, we intend to add the following features to this // package: @@ -58,5 +58,4 @@ // 1. A Digester type that supports write sink digest calculation. // // 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry. -// package digest diff --git a/tests-extension/vendor/github.com/pborman/uuid/dce.go b/tests-extension/vendor/github.com/pborman/uuid/dce.go index 50a0f2d099..cc96962dad 100644 --- a/tests-extension/vendor/github.com/pborman/uuid/dce.go +++ b/tests-extension/vendor/github.com/pborman/uuid/dce.go @@ -42,7 +42,7 @@ func NewDCESecurity(domain Domain, id uint32) UUID { // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // -// NewDCEPerson(Person, uint32(os.Getuid())) +// NewDCEPerson(Person, uint32(os.Getuid())) func NewDCEPerson() UUID { return NewDCESecurity(Person, uint32(os.Getuid())) } @@ -50,7 +50,7 @@ func NewDCEPerson() UUID { // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // -// NewDCEGroup(Group, uint32(os.Getgid())) +// NewDCEGroup(Group, uint32(os.Getgid())) func NewDCEGroup() UUID { return NewDCESecurity(Group, uint32(os.Getgid())) } diff --git a/tests-extension/vendor/github.com/pborman/uuid/hash.go b/tests-extension/vendor/github.com/pborman/uuid/hash.go index a0420c1ef3..99fa6b0d07 100644 --- a/tests-extension/vendor/github.com/pborman/uuid/hash.go +++ b/tests-extension/vendor/github.com/pborman/uuid/hash.go @@ -39,7 +39,7 @@ func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. // -// NewHash(md5.New(), space, data, 3) +// NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } @@ -47,7 +47,7 @@ func NewMD5(space UUID, data []byte) UUID { // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. // -// NewHash(sha1.New(), space, data, 5) +// NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } diff --git a/tests-extension/vendor/github.com/pborman/uuid/version4.go b/tests-extension/vendor/github.com/pborman/uuid/version4.go index 767dd0c3aa..e267ec4579 100644 --- a/tests-extension/vendor/github.com/pborman/uuid/version4.go +++ b/tests-extension/vendor/github.com/pborman/uuid/version4.go @@ -13,11 +13,11 @@ import guuid "github.com/google/uuid" // // A note about uniqueness derived from the UUID Wikipedia entry: // -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. func NewRandom() UUID { if gu, err := guuid.NewRandom(); err == nil { return UUID(gu[:]) diff --git a/tests-extension/vendor/github.com/pkg/errors/errors.go b/tests-extension/vendor/github.com/pkg/errors/errors.go index 161aea2582..5d90dd4cc1 100644 --- a/tests-extension/vendor/github.com/pkg/errors/errors.go +++ b/tests-extension/vendor/github.com/pkg/errors/errors.go @@ -2,89 +2,89 @@ // // The traditional error handling idiom in Go is roughly akin to // -// if err != nil { -// return err -// } +// if err != nil { +// return err +// } // // which when applied recursively up the call stack results in error reports // without context or debugging information. The errors package allows // programmers to add context to the failure path in their code in a way // that does not destroy the original value of the error. // -// Adding context to an error +// # Adding context to an error // // The errors.Wrap function returns a new error that adds context to the // original error by recording a stack trace at the point Wrap is called, // together with the supplied message. For example // -// _, err := ioutil.ReadAll(r) -// if err != nil { -// return errors.Wrap(err, "read failed") -// } +// _, err := ioutil.ReadAll(r) +// if err != nil { +// return errors.Wrap(err, "read failed") +// } // // If additional control is required, the errors.WithStack and // errors.WithMessage functions destructure errors.Wrap into its component // operations: annotating an error with a stack trace and with a message, // respectively. // -// Retrieving the cause of an error +// # Retrieving the cause of an error // // Using errors.Wrap constructs a stack of errors, adding context to the // preceding error. Depending on the nature of the error it may be necessary // to reverse the operation of errors.Wrap to retrieve the original error // for inspection. Any error value which implements this interface // -// type causer interface { -// Cause() error -// } +// type causer interface { +// Cause() error +// } // // can be inspected by errors.Cause. errors.Cause will recursively retrieve // the topmost error that does not implement causer, which is assumed to be // the original cause. For example: // -// switch err := errors.Cause(err).(type) { -// case *MyError: -// // handle specifically -// default: -// // unknown error -// } +// switch err := errors.Cause(err).(type) { +// case *MyError: +// // handle specifically +// default: +// // unknown error +// } // // Although the causer interface is not exported by this package, it is // considered a part of its stable public interface. // -// Formatted printing of errors +// # Formatted printing of errors // // All error values returned from this package implement fmt.Formatter and can // be formatted by the fmt package. The following verbs are supported: // -// %s print the error. If the error has a Cause it will be -// printed recursively. -// %v see %s -// %+v extended format. Each Frame of the error's StackTrace will -// be printed in detail. +// %s print the error. If the error has a Cause it will be +// printed recursively. +// %v see %s +// %+v extended format. Each Frame of the error's StackTrace will +// be printed in detail. // -// Retrieving the stack trace of an error or wrapper +// # Retrieving the stack trace of an error or wrapper // // New, Errorf, Wrap, and Wrapf record a stack trace at the point they are // invoked. This information can be retrieved with the following interface: // -// type stackTracer interface { -// StackTrace() errors.StackTrace -// } +// type stackTracer interface { +// StackTrace() errors.StackTrace +// } // // The returned errors.StackTrace type is defined as // -// type StackTrace []Frame +// type StackTrace []Frame // // The Frame type represents a call site in the stack trace. Frame supports // the fmt.Formatter interface that can be used for printing information about // the stack trace of this error. For example: // -// if err, ok := err.(stackTracer); ok { -// for _, f := range err.StackTrace() { -// fmt.Printf("%+s:%d\n", f, f) -// } -// } +// if err, ok := err.(stackTracer); ok { +// for _, f := range err.StackTrace() { +// fmt.Printf("%+s:%d\n", f, f) +// } +// } // // Although the stackTracer interface is not exported by this package, it is // considered a part of its stable public interface. @@ -265,9 +265,9 @@ func (w *withMessage) Format(s fmt.State, verb rune) { // An error value has a cause if it implements the following // interface: // -// type causer interface { -// Cause() error -// } +// type causer interface { +// Cause() error +// } // // If the error does not implement Cause, the original error will // be returned. If the error is nil, nil will be returned without further diff --git a/tests-extension/vendor/github.com/pkg/errors/go113.go b/tests-extension/vendor/github.com/pkg/errors/go113.go index be0d10d0c7..2c83c72453 100644 --- a/tests-extension/vendor/github.com/pkg/errors/go113.go +++ b/tests-extension/vendor/github.com/pkg/errors/go113.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package errors diff --git a/tests-extension/vendor/github.com/pkg/errors/stack.go b/tests-extension/vendor/github.com/pkg/errors/stack.go index 779a8348fb..82784d7003 100644 --- a/tests-extension/vendor/github.com/pkg/errors/stack.go +++ b/tests-extension/vendor/github.com/pkg/errors/stack.go @@ -51,16 +51,16 @@ func (f Frame) name() string { // Format formats the frame according to the fmt.Formatter interface. // -// %s source file -// %d source line -// %n function name -// %v equivalent to %s:%d +// %s source file +// %d source line +// %n function name +// %v equivalent to %s:%d // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+s function name and path of source file relative to the compile time -// GOPATH separated by \n\t (\n\t) -// %+v equivalent to %+s:%d +// %+s function name and path of source file relative to the compile time +// GOPATH separated by \n\t (\n\t) +// %+v equivalent to %+s:%d func (f Frame) Format(s fmt.State, verb rune) { switch verb { case 's': @@ -98,12 +98,12 @@ type StackTrace []Frame // Format formats the stack of Frames according to the fmt.Formatter interface. // -// %s lists source files for each Frame in the stack -// %v lists the source file and line number for each Frame in the stack +// %s lists source files for each Frame in the stack +// %v lists the source file and line number for each Frame in the stack // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+v Prints filename, function, and line number for each Frame in the stack. +// %+v Prints filename, function, and line number for each Frame in the stack. func (st StackTrace) Format(s fmt.State, verb rune) { switch verb { case 'v': diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/doc.go b/tests-extension/vendor/github.com/sirupsen/logrus/doc.go index da67aba06d..51392be8f6 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/doc.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/doc.go @@ -1,25 +1,25 @@ /* Package logrus is a structured logger for Go, completely API compatible with the standard library logger. - The simplest way to use Logrus is simply the package-level exported logger: - package main + package main - import ( - log "github.com/sirupsen/logrus" - ) + import ( + log "github.com/sirupsen/logrus" + ) - func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "number": 1, - "size": 10, - }).Info("A walrus appears") - } + func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + "number": 1, + "size": 10, + }).Info("A walrus appears") + } Output: - time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 + + time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 For a full guide visit https://github.com/sirupsen/logrus */ diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/formatter.go b/tests-extension/vendor/github.com/sirupsen/logrus/formatter.go index 408883773e..8c76155154 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/formatter.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/formatter.go @@ -30,12 +30,12 @@ type Formatter interface { // This is to not silently overwrite `time`, `msg`, `func` and `level` fields when // dumping it. If this code wasn't there doing: // -// logrus.WithField("level", 1).Info("hello") +// logrus.WithField("level", 1).Info("hello") // // Would just silently drop the user provided level. Instead with this code // it'll logged as: // -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} +// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} // // It's not exported because it's still using Data in an opinionated way. It's to // avoid code duplication between the two default formatters. diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/logger.go b/tests-extension/vendor/github.com/sirupsen/logrus/logger.go index 5ff0aef6d3..df059412e9 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/logger.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/logger.go @@ -76,12 +76,12 @@ func (mw *MutexWrap) Disable() { // `Out` and `Hooks` directly on the default logger instance. You can also just // instantiate your own: // -// var log = &logrus.Logger{ -// Out: os.Stderr, -// Formatter: new(logrus.TextFormatter), -// Hooks: make(logrus.LevelHooks), -// Level: logrus.DebugLevel, -// } +// var log = &logrus.Logger{ +// Out: os.Stderr, +// Formatter: new(logrus.TextFormatter), +// Hooks: make(logrus.LevelHooks), +// Level: logrus.DebugLevel, +// } // // It's recommended to make this a global instance called `log`. func New() *Logger { @@ -347,9 +347,9 @@ func (logger *Logger) Exit(code int) { logger.ExitFunc(code) } -//When file is opened with appending mode, it's safe to -//write concurrently to a file (within 4k message on Linux). -//In these cases user can choose to disable the lock. +// When file is opened with appending mode, it's safe to +// write concurrently to a file (within 4k message on Linux). +// In these cases user can choose to disable the lock. func (logger *Logger) SetNoLock() { logger.mu.Disable() } diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go index 2403de9819..45de3e2b67 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go @@ -1,3 +1,4 @@ +//go:build appengine // +build appengine package logrus diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go index 499789984d..e3fa38b710 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go @@ -1,3 +1,4 @@ +//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && !js // +build darwin dragonfly freebsd netbsd openbsd // +build !js diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_js.go index ebdae3ec62..9e951f1b42 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_js.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_js.go @@ -1,3 +1,4 @@ +//go:build js // +build js package logrus diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go index 97af92c68e..04232da191 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go @@ -1,3 +1,4 @@ +//go:build js || nacl || plan9 // +build js nacl plan9 package logrus diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go index 3293fb3caa..1b4a99e325 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go @@ -1,3 +1,4 @@ +//go:build !appengine && !js && !windows && !nacl && !plan9 // +build !appengine,!js,!windows,!nacl,!plan9 package logrus diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_unix.go index 04748b8515..f3154b17fc 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_unix.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_unix.go @@ -1,3 +1,4 @@ +//go:build (linux || aix || zos) && !js // +build linux aix zos // +build !js diff --git a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_windows.go index 2879eb50ea..893c62410c 100644 --- a/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_windows.go +++ b/tests-extension/vendor/github.com/sirupsen/logrus/terminal_check_windows.go @@ -1,3 +1,4 @@ +//go:build !appengine && !js && windows // +build !appengine,!js,windows package logrus diff --git a/tests-extension/vendor/github.com/spf13/pflag/flag.go b/tests-extension/vendor/github.com/spf13/pflag/flag.go index 7c058de374..02de50a0b2 100644 --- a/tests-extension/vendor/github.com/spf13/pflag/flag.go +++ b/tests-extension/vendor/github.com/spf13/pflag/flag.go @@ -27,23 +27,32 @@ unaffected. Define flags using flag.String(), Bool(), Int(), etc. This declares an integer flag, -flagname, stored in the pointer ip, with type *int. + var ip = flag.Int("flagname", 1234, "help message for flagname") + If you like, you can bind the flag to a variable using the Var() functions. + var flagvar int func init() { flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname") } + Or you can create custom flags that satisfy the Value interface (with pointer receivers) and couple them to flag parsing by + flag.Var(&flagVal, "name", "help message for flagname") + For such flags, the default value is just the initial value of the variable. After all flags are defined, call + flag.Parse() + to parse the command line into the defined flags. Flags may then be used directly. If you're using the flags themselves, they are all pointers; if you bind to variables, they're values. + fmt.Println("ip has value ", *ip) fmt.Println("flagvar has value ", flagvar) @@ -54,22 +63,26 @@ The arguments are indexed from 0 through flag.NArg()-1. The pflag package also defines some new functions that are not in flag, that give one-letter shorthands for flags. You can use these by appending 'P' to the name of any function that defines a flag. + var ip = flag.IntP("flagname", "f", 1234, "help message") var flagvar bool func init() { flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") } flag.VarP(&flagval, "varname", "v", "help message") + Shorthand letters can be used with single dashes on the command line. Boolean shorthand flags can be combined with other shorthand flags. Command line flag syntax: + --flag // boolean flags only --flag=x Unlike the flag package, a single dash before an option means something different than a double dash. Single dashes signify a series of shorthand letters for flags. All but the last shorthand letter must be boolean flags. + // boolean flags -f -abc @@ -934,9 +947,9 @@ func (f *FlagSet) usage() { } } -//--unknown (args will be empty) -//--unknown --next-flag ... (args will be --next-flag ...) -//--unknown arg ... (args will be arg ...) +// --unknown (args will be empty) +// --unknown --next-flag ... (args will be --next-flag ...) +// --unknown arg ... (args will be arg ...) func stripUnknownFlagValue(args []string) []string { if len(args) == 0 { //--unknown diff --git a/tests-extension/vendor/github.com/spf13/pflag/string_slice.go b/tests-extension/vendor/github.com/spf13/pflag/string_slice.go index 3cb2e69dba..d421887e86 100644 --- a/tests-extension/vendor/github.com/spf13/pflag/string_slice.go +++ b/tests-extension/vendor/github.com/spf13/pflag/string_slice.go @@ -98,9 +98,12 @@ func (f *FlagSet) GetStringSlice(name string) ([]string, error) { // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { f.VarP(newStringSliceValue(value, p), name, "", usage) } @@ -114,9 +117,12 @@ func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []s // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func StringSliceVar(p *[]string, name string, value []string, usage string) { CommandLine.VarP(newStringSliceValue(value, p), name, "", usage) } @@ -130,9 +136,12 @@ func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { p := []string{} f.StringSliceVarP(&p, name, "", value, usage) @@ -150,9 +159,12 @@ func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage str // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func StringSlice(name string, value []string, usage string) *[]string { return CommandLine.StringSliceP(name, "", value, usage) } diff --git a/tests-extension/vendor/github.com/tidwall/match/match.go b/tests-extension/vendor/github.com/tidwall/match/match.go index 11da28f1b9..d41013a38b 100644 --- a/tests-extension/vendor/github.com/tidwall/match/match.go +++ b/tests-extension/vendor/github.com/tidwall/match/match.go @@ -10,13 +10,15 @@ import ( // and '?' matches on any one character. // // pattern: -// { term } +// +// { term } +// // term: -// '*' matches any sequence of non-Separator characters -// '?' matches any single non-Separator character -// c matches character c (c != '*', '?', '\\') -// '\\' c matches character c // +// '*' matches any sequence of non-Separator characters +// '?' matches any single non-Separator character +// c matches character c (c != '*', '?', '\\') +// '\\' c matches character c func Match(str, pattern string) bool { if pattern == "*" { return true diff --git a/tests-extension/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go b/tests-extension/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go index d7099c35bc..2d0e1d2f33 100644 --- a/tests-extension/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go +++ b/tests-extension/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go @@ -42,7 +42,7 @@ const ( // a bit-mask. To extract the bit-field, for example, use an // expression like: // -// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) +// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) // // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. // diff --git a/tests-extension/vendor/gopkg.in/inf.v0/dec.go b/tests-extension/vendor/gopkg.in/inf.v0/dec.go index 26548b63ce..124cce1443 100644 --- a/tests-extension/vendor/gopkg.in/inf.v0/dec.go +++ b/tests-extension/vendor/gopkg.in/inf.v0/dec.go @@ -9,17 +9,16 @@ // This package is currently in experimental stage and the API may change. // // This package does NOT support: -// - rounding to specific precisions (as opposed to specific decimal positions) -// - the notion of context (each rounding must be explicit) -// - NaN and Inf values, and distinguishing between positive and negative zero -// - conversions to and from float32/64 types +// - rounding to specific precisions (as opposed to specific decimal positions) +// - the notion of context (each rounding must be explicit) +// - NaN and Inf values, and distinguishing between positive and negative zero +// - conversions to and from float32/64 types // // Features considered for possible addition: -// + formatting options -// + Exp method -// + combined operations such as AddRound/MulAdd etc -// + exchanging data in decimal32/64/128 formats -// +// - formatting options +// - Exp method +// - combined operations such as AddRound/MulAdd etc +// - exchanging data in decimal32/64/128 formats package inf // import "gopkg.in/inf.v0" // TODO: @@ -43,19 +42,19 @@ import ( // // The mathematical value of a Dec equals: // -// unscaled * 10**(-scale) +// unscaled * 10**(-scale) // // Note that different Dec representations may have equal mathematical values. // -// unscaled scale String() -// ------------------------- -// 0 0 "0" -// 0 2 "0.00" -// 0 -2 "0" -// 1 0 "1" -// 100 2 "1.00" -// 10 0 "10" -// 1 -1 "10" +// unscaled scale String() +// ------------------------- +// 0 0 "0" +// 0 2 "0.00" +// 0 -2 "0" +// 1 0 "1" +// 100 2 "1.00" +// 10 0 "10" +// 1 -1 "10" // // The zero value for a Dec represents the value 0 with scale 0. // @@ -79,7 +78,6 @@ import ( // QuoRound should be used with a Scale and a Rounder. // QuoExact or QuoRound with RoundExact can be used in the special cases when it // is known that the result is always a finite decimal. -// type Dec struct { unscaled big.Int scale Scale @@ -182,7 +180,6 @@ func (z *Dec) Set(x *Dec) *Dec { // -1 if x < 0 // 0 if x == 0 // +1 if x > 0 -// func (x *Dec) Sign() int { return x.UnscaledBig().Sign() } @@ -196,10 +193,9 @@ func (z *Dec) Neg(x *Dec) *Dec { // Cmp compares x and y and returns: // -// -1 if x < y -// 0 if x == y -// +1 if x > y -// +// -1 if x < y +// 0 if x == y +// +1 if x > y func (x *Dec) Cmp(y *Dec) int { xx, yy := upscale(x, y) return xx.UnscaledBig().Cmp(yy.UnscaledBig()) @@ -252,7 +248,6 @@ func (z *Dec) Round(x *Dec, s Scale, r Rounder) *Dec { // // There is no corresponding Div method; the equivalent can be achieved through // the choice of Rounder used. -// func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec { return z.quo(x, y, sclr{s}, r) } @@ -290,10 +285,9 @@ func (z *Dec) QuoExact(x, y *Dec) *Dec { // The remainder is normalized to the range -1 < r < 1 to simplify rounding; // that is, the results satisfy the following equation: // -// x / y = z + (remNum/remDen) * 10**(-z.Scale()) +// x / y = z + (remNum/remDen) * 10**(-z.Scale()) // // See Rounder for more details about rounding. -// func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool, remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) { // difference (required adjustment) compared to "canonical" result scale diff --git a/tests-extension/vendor/gopkg.in/inf.v0/rounder.go b/tests-extension/vendor/gopkg.in/inf.v0/rounder.go index 3a97ef529b..866180bf4c 100644 --- a/tests-extension/vendor/gopkg.in/inf.v0/rounder.go +++ b/tests-extension/vendor/gopkg.in/inf.v0/rounder.go @@ -9,7 +9,6 @@ import ( // Dec.Quo(). // // See the Example for results of using each Rounder with some sample values. -// type Rounder rounder // See http://speleotrove.com/decimal/damodel.html#refround for more detailed diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/apic.go b/tests-extension/vendor/gopkg.in/yaml.v2/apic.go index acf71402cf..fb2821e1e6 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/apic.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/apic.go @@ -143,7 +143,7 @@ func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { emitter.canonical = canonical } -//// Set the indentation increment. +// // Set the indentation increment. func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { if indent < 2 || indent > 9 { indent = 2 diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/emitterc.go b/tests-extension/vendor/gopkg.in/yaml.v2/emitterc.go index a1c2cc5262..638a268c79 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/emitterc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/emitterc.go @@ -130,10 +130,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/parserc.go b/tests-extension/vendor/gopkg.in/yaml.v2/parserc.go index 81d05dfe57..2883e5c58f 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/parserc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/parserc.go @@ -170,7 +170,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -192,9 +193,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -277,8 +281,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -299,9 +303,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -332,30 +337,41 @@ func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -574,8 +590,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -627,7 +643,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -664,14 +681,14 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -723,13 +740,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -757,16 +772,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -825,11 +842,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -849,8 +865,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -873,8 +889,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -891,16 +907,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -965,8 +982,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/readerc.go b/tests-extension/vendor/gopkg.in/yaml.v2/readerc.go index 7c1f5fac3d..b0c436c4a8 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/readerc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/resolve.go b/tests-extension/vendor/gopkg.in/yaml.v2/resolve.go index 4120e0c916..e29c364b33 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/resolve.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/scannerc.go b/tests-extension/vendor/gopkg.in/yaml.v2/scannerc.go index 0b9bb6030a..d634dca4b0 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/scannerc.go @@ -1500,11 +1500,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1601,11 +1601,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1640,8 +1640,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1679,10 +1680,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1716,9 +1718,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/sorter.go b/tests-extension/vendor/gopkg.in/yaml.v2/sorter.go index 4c45e660a8..2edd734055 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/sorter.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/yaml.go b/tests-extension/vendor/gopkg.in/yaml.v2/yaml.go index 30813884c0..03756f6bbb 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/yaml.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/yaml.go @@ -2,8 +2,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -67,16 +66,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -166,36 +164,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() diff --git a/tests-extension/vendor/gopkg.in/yaml.v2/yamlh.go b/tests-extension/vendor/gopkg.in/yaml.v2/yamlh.go index f6a9c8e34b..640f9d95de 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/tests-extension/vendor/gopkg.in/yaml.v2/yamlh.go @@ -408,7 +408,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -604,13 +606,14 @@ type yaml_parser_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/apic.go b/tests-extension/vendor/gopkg.in/yaml.v3/apic.go index ae7d049f18..05fd305da1 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/apic.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/apic.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/emitterc.go b/tests-extension/vendor/gopkg.in/yaml.v3/emitterc.go index 0f47c9ca8a..dde20e5079 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/emitterc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/emitterc.go @@ -162,10 +162,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true @@ -241,7 +240,7 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) } } return true diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/parserc.go b/tests-extension/vendor/gopkg.in/yaml.v3/parserc.go index 268558a0d6..25fe823637 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/parserc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/parserc.go @@ -227,7 +227,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -249,9 +250,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -356,8 +360,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -379,9 +383,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -428,30 +433,41 @@ func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -682,8 +698,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -740,7 +756,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -805,14 +822,14 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -881,13 +898,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -915,16 +930,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -987,11 +1004,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1011,8 +1027,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1035,8 +1051,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1053,16 +1069,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -1128,8 +1145,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/readerc.go b/tests-extension/vendor/gopkg.in/yaml.v3/readerc.go index b7de0a89c4..56af245366 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/readerc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/readerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/scannerc.go b/tests-extension/vendor/gopkg.in/yaml.v3/scannerc.go index ca0070108f..30b1f08920 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1614,11 +1614,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1719,11 +1719,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1758,8 +1758,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1797,10 +1798,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1834,9 +1836,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte @@ -2847,7 +2849,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t continue } if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false @@ -2876,7 +2878,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, - line: text, + line: text, }) } return true @@ -2910,7 +2912,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 + foot_line = parser.mark.line - parser.newlines + 1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } @@ -2996,7 +2998,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo recent_empty = false // Consume until after the consumed comment line. - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/writerc.go b/tests-extension/vendor/gopkg.in/yaml.v3/writerc.go index b8a116bf9a..266d0b092c 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/writerc.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/writerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/yaml.go b/tests-extension/vendor/gopkg.in/yaml.v3/yaml.go index 8cec6da48d..f0bedf3d63 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/yaml.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/yaml.go @@ -17,8 +17,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -75,16 +74,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -185,36 +183,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() @@ -358,22 +355,21 @@ const ( // // For example: // -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) // -// var person Node -// err := yaml.Unmarshal(data, &person) +// Or by itself: // +// var person Node +// err := yaml.Unmarshal(data, &person) type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind + Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style @@ -421,7 +417,6 @@ func (n *Node) IsZero() bool { n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } - // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/yamlh.go b/tests-extension/vendor/gopkg.in/yaml.v3/yamlh.go index 7c6d007706..ddcd5513ba 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/yamlh.go @@ -438,7 +438,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -639,7 +641,6 @@ type yaml_parser_t struct { } type yaml_comment_t struct { - scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark @@ -659,13 +660,14 @@ type yaml_comment_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/tests-extension/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/tests-extension/vendor/gopkg.in/yaml.v3/yamlprivateh.go index e88f9c54ae..dea1ba9610 100644 --- a/tests-extension/vendor/gopkg.in/yaml.v3/yamlprivateh.go +++ b/tests-extension/vendor/gopkg.in/yaml.v3/yamlprivateh.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -137,8 +137,8 @@ func is_crlf(b []byte, i int) bool { func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( - // is_break: - b[i] == '\r' || // CR (#xD) + // is_break: + b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) @@ -151,8 +151,8 @@ func is_breakz(b []byte, i int) bool { func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( - // is_space: - b[i] == ' ' || + // is_space: + b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) @@ -166,8 +166,8 @@ func is_spacez(b []byte, i int) bool { func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || + // is_blank: + b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) diff --git a/tests-extension/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go b/tests-extension/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go index 5b8514b3fa..e38605df92 100644 --- a/tests-extension/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go +++ b/tests-extension/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go @@ -359,8 +359,9 @@ const ( // 4) simpleLetterEqualFold, no specials, no non-letters. // // The letters S and K are special because they map to 3 runes, not just 2: -// * S maps to s and to U+017F 'ſ' Latin small letter long s -// * k maps to K and to U+212A 'K' Kelvin sign +// - S maps to s and to U+017F 'ſ' Latin small letter long s +// - k maps to K and to U+212A 'K' Kelvin sign +// // See http://play.golang.org/p/tTxjOc0OGo // // The returned function is specialized for matching against s and diff --git a/tests-extension/vendor/k8s.io/utils/inotify/inotify_others.go b/tests-extension/vendor/k8s.io/utils/inotify/inotify_others.go index 7297644040..77ef7be1ba 100644 --- a/tests-extension/vendor/k8s.io/utils/inotify/inotify_others.go +++ b/tests-extension/vendor/k8s.io/utils/inotify/inotify_others.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux /* diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go index acf71402cf..fb2821e1e6 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go @@ -143,7 +143,7 @@ func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { emitter.canonical = canonical } -//// Set the indentation increment. +// // Set the indentation increment. func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { if indent < 2 || indent > 9 { indent = 2 diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go index a1c2cc5262..638a268c79 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go @@ -130,10 +130,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go index 81d05dfe57..2883e5c58f 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go @@ -170,7 +170,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -192,9 +193,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -277,8 +281,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -299,9 +303,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -332,30 +337,41 @@ func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -574,8 +590,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -627,7 +643,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -664,14 +681,14 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -723,13 +740,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -757,16 +772,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -825,11 +842,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -849,8 +865,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -873,8 +889,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -891,16 +907,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -965,8 +982,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go index 7c1f5fac3d..b0c436c4a8 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go index 4120e0c916..e29c364b33 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go index 0b9bb6030a..d634dca4b0 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go @@ -1500,11 +1500,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1601,11 +1601,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1640,8 +1640,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1679,10 +1680,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1716,9 +1718,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go index 4c45e660a8..2edd734055 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go index 30813884c0..03756f6bbb 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go @@ -2,8 +2,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -67,16 +66,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -166,36 +164,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() diff --git a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go index f6a9c8e34b..640f9d95de 100644 --- a/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go +++ b/tests-extension/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go @@ -408,7 +408,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -604,13 +606,14 @@ type yaml_parser_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/tools.go b/tools.go index e63fe1fd15..f4d95d61ae 100644 --- a/tools.go +++ b/tools.go @@ -10,12 +10,12 @@ import ( _ "github.com/mikefarah/yq/v3" // Generate embedded files. _ "github.com/go-bindata/go-bindata/v3/go-bindata" - _ "github.com/golang/mock/mockgen" _ "github.com/googleapis/gnostic" _ "github.com/grpc-ecosystem/grpc-health-probe" _ "github.com/maxbrunsfeld/counterfeiter/v6" _ "github.com/onsi/ginkgo/v2/ginkgo" _ "github.com/operator-framework/api/crds" // operators.coreos.com CRD manifests + _ "go.uber.org/mock/mockgen" _ "google.golang.org/grpc/cmd/protoc-gen-go-grpc" _ "google.golang.org/protobuf/cmd/protoc-gen-go" _ "k8s.io/code-generator" diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go index 5599082ae9..bf71684f45 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/api.go b/vendor/github.com/Azure/go-ansiterm/winterm/api.go index 6055e33b91..2f297601b5 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/api.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/api.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go index cbec8f728f..644d8b2b48 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go index 3ee06ea728..6b4b8a1ef1 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go index 244b5fa25e..1298544a33 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go index 2d27fa1d02..03ab280c18 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go index afa7635d77..3535349f0e 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go index 2d40fb75ad..1e19ea0c37 100644 --- a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go +++ b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package winterm diff --git a/vendor/github.com/MakeNowJust/heredoc/heredoc.go b/vendor/github.com/MakeNowJust/heredoc/heredoc.go index 1fc0469555..fd3dd86c05 100644 --- a/vendor/github.com/MakeNowJust/heredoc/heredoc.go +++ b/vendor/github.com/MakeNowJust/heredoc/heredoc.go @@ -6,27 +6,27 @@ // // Golang supports raw-string syntax. // -// doc := ` -// Foo -// Bar -// ` +// doc := ` +// Foo +// Bar +// ` // // But raw-string cannot recognize indentation. Thus such content is an indented string, equivalent to // -// "\n\tFoo\n\tBar\n" +// "\n\tFoo\n\tBar\n" // // I dont't want this! // // However this problem is solved by package heredoc. // -// doc := heredoc.Doc(` -// Foo -// Bar -// `) +// doc := heredoc.Doc(` +// Foo +// Bar +// `) // // Is equivalent to // -// "Foo\nBar\n" +// "Foo\nBar\n" package heredoc import ( diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/com_port.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/com_port.go index 8bf8cab60e..e46cae4364 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/com_port.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/com_port.go @@ -9,7 +9,7 @@ package hcsschema -// ComPort specifies the named pipe that will be used for the port, with empty string indicating a disconnected port. +// ComPort specifies the named pipe that will be used for the port, with empty string indicating a disconnected port. type ComPort struct { NamedPipe string `json:"NamedPipe,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_memory_information.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_memory_information.go index 1fd7ca5d56..a5384ff353 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_memory_information.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/container_memory_information.go @@ -9,7 +9,7 @@ package hcsschema -// memory usage as viewed from within the container +// memory usage as viewed from within the container type ContainerMemoryInformation struct { TotalPhysicalBytes int32 `json:"TotalPhysicalBytes,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection_info.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection_info.go index 8a369bab71..4a3851e95e 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection_info.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/guest_connection_info.go @@ -9,7 +9,7 @@ package hcsschema -// Information about the guest. +// Information about the guest. type GuestConnectionInfo struct { // Each schema version x.y stands for the range of versions a.b where a==x and b<=y. This list comes from the SupportedSchemaVersions field in GcsCapabilities. diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_2.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_2.go index a017691f02..3f8aea5dd6 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_2.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_2.go @@ -9,7 +9,7 @@ package hcsschema -// HvSocket configuration for a VM +// HvSocket configuration for a VM type HvSocket2 struct { HvSocketConfig *HvSocketSystemConfig `json:"HvSocketConfig,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_address.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_address.go index 84c11b93ee..9ae843ae0a 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_address.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_address.go @@ -9,8 +9,8 @@ package hcsschema -// This class defines address settings applied to a VM -// by the GCS every time a VM starts or restores. +// This class defines address settings applied to a VM +// by the GCS every time a VM starts or restores. type HvSocketAddress struct { LocalAddress string `json:"LocalAddress,omitempty"` ParentAddress string `json:"ParentAddress,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_system_config.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_system_config.go index 69f4f9d39b..b1ee1d4a3b 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_system_config.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/hv_socket_system_config.go @@ -9,7 +9,7 @@ package hcsschema -// This is the HCS Schema version of the HvSocket configuration. The VMWP version is located in Config.Devices.IC in V1. +// This is the HCS Schema version of the HvSocket configuration. The VMWP version is located in Config.Devices.IC in V1. type HvSocketSystemConfig struct { // SDDL string that HvSocket will check before allowing a host process to bind to an unlisted service for this specific container/VM (not wildcard binds). diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_stats.go index 906ba597f9..3065f21aca 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_stats.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/memory_stats.go @@ -9,7 +9,7 @@ package hcsschema -// Memory runtime statistics +// Memory runtime statistics type MemoryStats struct { MemoryUsageCommitBytes uint64 `json:"MemoryUsageCommitBytes,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/numa_setting.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/numa_setting.go index 3f27b2ca01..c77b940704 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/numa_setting.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/numa_setting.go @@ -12,10 +12,10 @@ package hcsschema type NumaSetting struct { - VirtualNodeNumber uint32 `json:"VirtualNodeNumber,omitempty"` - PhysicalNodeNumber uint32 `json:"PhysicalNodeNumber,omitempty"` - VirtualSocketNumber uint32 `json:"VirtualSocketNumber,omitempty"` - CountOfProcessors uint32 `json:"CountOfProcessors,omitempty"` - CountOfMemoryBlocks uint64 `json:"CountOfMemoryBlocks,omitempty"` - MemoryBackingType MemoryBackingType `json:"MemoryBackingType,omitempty"` + VirtualNodeNumber uint32 `json:"VirtualNodeNumber,omitempty"` + PhysicalNodeNumber uint32 `json:"PhysicalNodeNumber,omitempty"` + VirtualSocketNumber uint32 `json:"VirtualSocketNumber,omitempty"` + CountOfProcessors uint32 `json:"CountOfProcessors,omitempty"` + CountOfMemoryBlocks uint64 `json:"CountOfMemoryBlocks,omitempty"` + MemoryBackingType MemoryBackingType `json:"MemoryBackingType,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_notification.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_notification.go index d96c9501f3..a9769c9345 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_notification.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_notification.go @@ -9,7 +9,7 @@ package hcsschema -// Notification data that is indicated to components running in the Virtual Machine. +// Notification data that is indicated to components running in the Virtual Machine. type PauseNotification struct { Reason string `json:"Reason,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_options.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_options.go index 21707a88eb..d48e043421 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_options.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/pause_options.go @@ -9,7 +9,7 @@ package hcsschema -// Options for HcsPauseComputeSystem +// Options for HcsPauseComputeSystem type PauseOptions struct { SuspensionLevel string `json:"SuspensionLevel,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_details.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_details.go index e9a662dd59..de56374b29 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_details.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/process_details.go @@ -13,7 +13,7 @@ import ( "time" ) -// Information about a process running in a container +// Information about a process running in a container type ProcessDetails struct { ProcessId int32 `json:"ProcessId,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_stats.go index 6157e25225..db42a19ea6 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_stats.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/processor_stats.go @@ -9,7 +9,7 @@ package hcsschema -// CPU runtime statistics +// CPU runtime statistics type ProcessorStats struct { TotalRuntime100ns uint64 `json:"TotalRuntime100ns,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_query.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_query.go index d6d80df131..c7ebd66092 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_query.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/property_query.go @@ -9,7 +9,7 @@ package hcsschema -// By default the basic properties will be returned. This query provides a way to request specific properties. +// By default the basic properties will be returned. This query provides a way to request specific properties. type PropertyQuery struct { PropertyTypes []PropertyType `json:"PropertyTypes,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/silo_properties.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/silo_properties.go index 5eaf6a7f4a..eb7338c650 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/silo_properties.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/silo_properties.go @@ -9,7 +9,7 @@ package hcsschema -// Silo job information +// Silo job information type SiloProperties struct { Enabled bool `json:"Enabled,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/statistics.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/statistics.go index ba7a6b3963..6e2dce6f42 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/statistics.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/statistics.go @@ -13,7 +13,7 @@ import ( "time" ) -// Runtime statistics for a container +// Runtime statistics for a container type Statistics struct { Timestamp time.Time `json:"Timestamp,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_stats.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_stats.go index 4f042ffd93..36f190aec8 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_stats.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/storage_stats.go @@ -9,7 +9,7 @@ package hcsschema -// Storage runtime statistics +// Storage runtime statistics type StorageStats struct { ReadCountNormalized uint64 `json:"ReadCountNormalized,omitempty"` diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/topology.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/topology.go index 9cca85171e..a4dc866eb9 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/topology.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/topology.go @@ -12,7 +12,7 @@ package hcsschema type Topology struct { - Memory *VirtualMachineMemory `json:"Memory,omitempty"` - Processor *VirtualMachineProcessor `json:"Processor,omitempty"` - Numa *Numa `json:"Numa,omitempty"` + Memory *VirtualMachineMemory `json:"Memory,omitempty"` + Processor *VirtualMachineProcessor `json:"Processor,omitempty"` + Numa *Numa `json:"Numa,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine.go index 3f750466f8..0b66870ec6 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine.go @@ -15,15 +15,15 @@ package hcsschema type VirtualMachine struct { Version *Version `json:"Version,omitempty"` // When set to true, the virtual machine will treat a reset as a stop, releasing resources and cleaning up state. - StopOnReset bool `json:"StopOnReset,omitempty"` - Chipset *Chipset `json:"Chipset,omitempty"` - ComputeTopology *Topology `json:"ComputeTopology,omitempty"` - Devices *Devices `json:"Devices,omitempty"` - GuestState *GuestState `json:"GuestState,omitempty"` - RestoreState *RestoreState `json:"RestoreState,omitempty"` - RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"` - StorageQoS *StorageQoS `json:"StorageQoS,omitempty"` - DebugOptions *DebugOptions `json:"DebugOptions,omitempty"` - GuestConnection *GuestConnection `json:"GuestConnection,omitempty"` - SecuritySettings *SecuritySettings `json:"SecuritySettings,omitempty"` + StopOnReset bool `json:"StopOnReset,omitempty"` + Chipset *Chipset `json:"Chipset,omitempty"` + ComputeTopology *Topology `json:"ComputeTopology,omitempty"` + Devices *Devices `json:"Devices,omitempty"` + GuestState *GuestState `json:"GuestState,omitempty"` + RestoreState *RestoreState `json:"RestoreState,omitempty"` + RegistryChanges *RegistryChanges `json:"RegistryChanges,omitempty"` + StorageQoS *StorageQoS `json:"StorageQoS,omitempty"` + DebugOptions *DebugOptions `json:"DebugOptions,omitempty"` + GuestConnection *GuestConnection `json:"GuestConnection,omitempty"` + SecuritySettings *SecuritySettings `json:"SecuritySettings,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_memory.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_memory.go index 17573c92a5..d11fe37fde 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_memory.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_memory.go @@ -15,7 +15,7 @@ type VirtualMachineMemory struct { SizeInMB uint64 `json:"SizeInMB,omitempty"` Backing *MemoryBackingType `json:"Backing,omitempty"` // If enabled, then the VM's memory is backed by the Windows pagefile rather than physically backed, statically allocated memory. - AllowOvercommit bool `json:"AllowOvercommit,omitempty"` + AllowOvercommit bool `json:"AllowOvercommit,omitempty"` // If enabled, then the memory hot hint feature is exposed to the VM, allowing it to prefetch pages into its working set. (if supported by the guest operating system). EnableHotHint bool `json:"EnableHotHint,omitempty"` // If enabled, then the memory cold hint feature is exposed to the VM, allowing it to trim zeroed pages from its working set (if supported by the guest operating system). @@ -27,7 +27,7 @@ type VirtualMachineMemory struct { // Low MMIO region allocated below 4GB LowMMIOGapInMB uint64 `json:"LowMmioGapInMB,omitempty"` // High MMIO region allocated above 4GB (base and size) - HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"` - HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"` - SlitType *VirtualSlitType `json:"SlitType,omitempty"` + HighMMIOBaseInMB uint64 `json:"HighMmioBaseInMB,omitempty"` + HighMMIOGapInMB uint64 `json:"HighMmioGapInMB,omitempty"` + SlitType *VirtualSlitType `json:"SlitType,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_processor.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_processor.go index 619cd83400..ea1bd731fe 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_processor.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_machine_processor.go @@ -12,10 +12,10 @@ package hcsschema type VirtualMachineProcessor struct { - Count uint32 `json:"Count,omitempty"` - Limit uint64 `json:"Limit,omitempty"` - Weight uint64 `json:"Weight,omitempty"` - Reservation uint64 `json:"Reservation,omitempty"` - CpuGroup *CpuGroup `json:"CpuGroup,omitempty"` - NumaProcessorsSettings *NumaProcessors `json:"NumaProcessorsSettings,omitempty"` + Count uint32 `json:"Count,omitempty"` + Limit uint64 `json:"Limit,omitempty"` + Weight uint64 `json:"Weight,omitempty"` + Reservation uint64 `json:"Reservation,omitempty"` + CpuGroup *CpuGroup `json:"CpuGroup,omitempty"` + NumaProcessorsSettings *NumaProcessors `json:"NumaProcessorsSettings,omitempty"` } diff --git a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_device.go b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_device.go index a4a62da163..202338904f 100644 --- a/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_device.go +++ b/vendor/github.com/Microsoft/hcsshim/internal/hcs/schema2/virtual_pci_device.go @@ -12,6 +12,6 @@ package hcsschema // TODO: PropagateNumaAffinity is pre-release/experimental field in schema 2.11. Need to add build number // docs when a public build with this is out. type VirtualPciDevice struct { - Functions []VirtualPciFunction `json:",omitempty"` - PropagateNumaAffinity *bool `json:"PropagateNumaAffinity,omitempty"` + Functions []VirtualPciFunction `json:",omitempty"` + PropagateNumaAffinity *bool `json:"PropagateNumaAffinity,omitempty"` } diff --git a/vendor/github.com/NYTimes/gziphandler/gzip_go18.go b/vendor/github.com/NYTimes/gziphandler/gzip_go18.go index fa9665b7e8..05d8bcf3d5 100644 --- a/vendor/github.com/NYTimes/gziphandler/gzip_go18.go +++ b/vendor/github.com/NYTimes/gziphandler/gzip_go18.go @@ -1,3 +1,4 @@ +//go:build go1.8 // +build go1.8 package gziphandler diff --git a/vendor/github.com/akrylysov/pogreb/fs/os_mmap_unix.go b/vendor/github.com/akrylysov/pogreb/fs/os_mmap_unix.go index 2a5d4c2738..298ced512c 100644 --- a/vendor/github.com/akrylysov/pogreb/fs/os_mmap_unix.go +++ b/vendor/github.com/akrylysov/pogreb/fs/os_mmap_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package fs diff --git a/vendor/github.com/akrylysov/pogreb/fs/os_mmap_windows.go b/vendor/github.com/akrylysov/pogreb/fs/os_mmap_windows.go index 1f2d8f053a..ff7ccd7a47 100644 --- a/vendor/github.com/akrylysov/pogreb/fs/os_mmap_windows.go +++ b/vendor/github.com/akrylysov/pogreb/fs/os_mmap_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package fs diff --git a/vendor/github.com/akrylysov/pogreb/fs/os_unix.go b/vendor/github.com/akrylysov/pogreb/fs/os_unix.go index 0b11c15aa8..e379b4a6f8 100644 --- a/vendor/github.com/akrylysov/pogreb/fs/os_unix.go +++ b/vendor/github.com/akrylysov/pogreb/fs/os_unix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package fs diff --git a/vendor/github.com/akrylysov/pogreb/fs/os_windows.go b/vendor/github.com/akrylysov/pogreb/fs/os_windows.go index cdd61c809e..c5ca330b03 100644 --- a/vendor/github.com/akrylysov/pogreb/fs/os_windows.go +++ b/vendor/github.com/akrylysov/pogreb/fs/os_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package fs diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go index d7d14f8eb6..593625434f 100644 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ b/vendor/github.com/beorn7/perks/quantile/stream.go @@ -9,7 +9,7 @@ // // For more detailed information about the algorithm used, see: // -// Effective Computation of Biased Quantiles over Data Streams +// # Effective Computation of Biased Quantiles over Data Streams // // http://www.cs.rutgers.edu/~muthu/bquant.pdf package quantile diff --git a/vendor/github.com/blang/semver/v4/range.go b/vendor/github.com/blang/semver/v4/range.go index 95f7139b97..b6ee1d8bcb 100644 --- a/vendor/github.com/blang/semver/v4/range.go +++ b/vendor/github.com/blang/semver/v4/range.go @@ -67,8 +67,8 @@ func (vr *versionRange) rangeFunc() Range { // Range represents a range of versions. // A Range can be used to check if a Version satisfies it: // -// range, err := semver.ParseRange(">1.0.0 <2.0.0") -// range(semver.MustParse("1.1.1") // returns true +// range, err := semver.ParseRange(">1.0.0 <2.0.0") +// range(semver.MustParse("1.1.1") // returns true type Range func(Version) bool // OR combines the existing Range with another Range using logical OR. @@ -108,7 +108,7 @@ func (rf Range) AND(f Range) Range { // // Ranges can be combined by both AND and OR // -// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` +// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` func ParseRange(s string) (Range, error) { parts := splitAndTrim(s) orParts, err := splitORParts(parts) diff --git a/vendor/github.com/containers/libtrust/ec_key_no_openssl.go b/vendor/github.com/containers/libtrust/ec_key_no_openssl.go index d6cdaca3f8..90d0e21f4b 100644 --- a/vendor/github.com/containers/libtrust/ec_key_no_openssl.go +++ b/vendor/github.com/containers/libtrust/ec_key_no_openssl.go @@ -1,3 +1,4 @@ +//go:build !libtrust_openssl // +build !libtrust_openssl package libtrust diff --git a/vendor/github.com/containers/libtrust/ec_key_openssl.go b/vendor/github.com/containers/libtrust/ec_key_openssl.go index 4137511f11..42bc2e4d44 100644 --- a/vendor/github.com/containers/libtrust/ec_key_openssl.go +++ b/vendor/github.com/containers/libtrust/ec_key_openssl.go @@ -1,3 +1,4 @@ +//go:build libtrust_openssl // +build libtrust_openssl package libtrust diff --git a/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/es6numfmt.go b/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/es6numfmt.go index 92574a3f4f..ae17f3d985 100644 --- a/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/es6numfmt.go +++ b/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/es6numfmt.go @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // - + // This package converts numbers in IEEE-754 double precision into the // format specified for JSON in EcmaScript Version 6 and forward. // The core application for this is canonicalization: @@ -22,50 +22,50 @@ package jsoncanonicalizer import ( - "errors" - "math" - "strconv" - "strings" + "errors" + "math" + "strconv" + "strings" ) const invalidPattern uint64 = 0x7ff0000000000000 func NumberToJSON(ieeeF64 float64) (res string, err error) { - ieeeU64 := math.Float64bits(ieeeF64) + ieeeU64 := math.Float64bits(ieeeF64) - // Special case: NaN and Infinity are invalid in JSON - if (ieeeU64 & invalidPattern) == invalidPattern { - return "null", errors.New("Invalid JSON number: " + strconv.FormatUint(ieeeU64, 16)) - } + // Special case: NaN and Infinity are invalid in JSON + if (ieeeU64 & invalidPattern) == invalidPattern { + return "null", errors.New("Invalid JSON number: " + strconv.FormatUint(ieeeU64, 16)) + } - // Special case: eliminate "-0" as mandated by the ES6-JSON/JCS specifications - if ieeeF64 == 0 { // Right, this line takes both -0 and 0 - return "0", nil - } + // Special case: eliminate "-0" as mandated by the ES6-JSON/JCS specifications + if ieeeF64 == 0 { // Right, this line takes both -0 and 0 + return "0", nil + } - // Deal with the sign separately - var sign string = "" - if ieeeF64 < 0 { - ieeeF64 =-ieeeF64 - sign = "-" - } + // Deal with the sign separately + var sign string = "" + if ieeeF64 < 0 { + ieeeF64 = -ieeeF64 + sign = "-" + } - // ES6 has a unique "g" format - var format byte = 'e' - if ieeeF64 < 1e+21 && ieeeF64 >= 1e-6 { - format = 'f' - } + // ES6 has a unique "g" format + var format byte = 'e' + if ieeeF64 < 1e+21 && ieeeF64 >= 1e-6 { + format = 'f' + } - // The following should do the trick: - es6Formatted := strconv.FormatFloat(ieeeF64, format, -1, 64) + // The following should do the trick: + es6Formatted := strconv.FormatFloat(ieeeF64, format, -1, 64) - // Minor cleanup - exponent := strings.IndexByte(es6Formatted, 'e') - if exponent > 0 { - // Go outputs "1e+09" which must be rewritten as "1e+9" - if es6Formatted[exponent + 2] == '0' { - es6Formatted = es6Formatted[:exponent + 2] + es6Formatted[exponent + 3:] - } - } - return sign + es6Formatted, nil + // Minor cleanup + exponent := strings.IndexByte(es6Formatted, 'e') + if exponent > 0 { + // Go outputs "1e+09" which must be rewritten as "1e+9" + if es6Formatted[exponent+2] == '0' { + es6Formatted = es6Formatted[:exponent+2] + es6Formatted[exponent+3:] + } + } + return sign + es6Formatted, nil } diff --git a/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/jsoncanonicalizer.go b/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/jsoncanonicalizer.go index 661f41055e..ab7a1be479 100644 --- a/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/jsoncanonicalizer.go +++ b/vendor/github.com/cyberphone/json-canonicalization/go/src/webpki.org/jsoncanonicalizer/jsoncanonicalizer.go @@ -13,366 +13,366 @@ // See the License for the specific language governing permissions and // limitations under the License. // - + // This package transforms JSON data in UTF-8 according to: // https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-02 package jsoncanonicalizer import ( - "errors" - "container/list" - "fmt" - "strconv" - "strings" - "unicode/utf16" + "container/list" + "errors" + "fmt" + "strconv" + "strings" + "unicode/utf16" ) type nameValueType struct { - name string - sortKey []uint16 - value string + name string + sortKey []uint16 + value string } // JSON standard escapes (modulo \u) -var asciiEscapes = []byte{'\\', '"', 'b', 'f', 'n', 'r', 't'} +var asciiEscapes = []byte{'\\', '"', 'b', 'f', 'n', 'r', 't'} var binaryEscapes = []byte{'\\', '"', '\b', '\f', '\n', '\r', '\t'} // JSON literals -var literals = []string{"true", "false", "null"} - +var literals = []string{"true", "false", "null"} + func Transform(jsonData []byte) (result []byte, e error) { - // JSON data MUST be UTF-8 encoded - var jsonDataLength int = len(jsonData) + // JSON data MUST be UTF-8 encoded + var jsonDataLength int = len(jsonData) - // Current pointer in jsonData - var index int = 0 + // Current pointer in jsonData + var index int = 0 - // "Forward" declarations are needed for closures referring each other - var parseElement func() string - var parseSimpleType func() string - var parseQuotedString func() string - var parseObject func() string - var parseArray func() string + // "Forward" declarations are needed for closures referring each other + var parseElement func() string + var parseSimpleType func() string + var parseQuotedString func() string + var parseObject func() string + var parseArray func() string - var globalError error = nil + var globalError error = nil - checkError := func(e error) { - // We only honor the first reported error - if globalError == nil { - globalError = e - } - } - - setError := func(msg string) { - checkError(errors.New(msg)) - } + checkError := func(e error) { + // We only honor the first reported error + if globalError == nil { + globalError = e + } + } - isWhiteSpace := func(c byte) bool { - return c == 0x20 || c == 0x0a || c == 0x0d || c == 0x09 - } + setError := func(msg string) { + checkError(errors.New(msg)) + } - nextChar := func() byte { - if index < jsonDataLength { - c := jsonData[index] - if c > 0x7f { - setError("Unexpected non-ASCII character") - } - index++ - return c - } - setError("Unexpected EOF reached") - return '"' - } + isWhiteSpace := func(c byte) bool { + return c == 0x20 || c == 0x0a || c == 0x0d || c == 0x09 + } - scan := func() byte { - for { - c := nextChar() - if isWhiteSpace(c) { - continue; - } - return c - } - } + nextChar := func() byte { + if index < jsonDataLength { + c := jsonData[index] + if c > 0x7f { + setError("Unexpected non-ASCII character") + } + index++ + return c + } + setError("Unexpected EOF reached") + return '"' + } - scanFor := func(expected byte) { - c := scan() - if c != expected { - setError("Expected '" + string(expected) + "' but got '" + string(c) + "'") - } - } + scan := func() byte { + for { + c := nextChar() + if isWhiteSpace(c) { + continue + } + return c + } + } - getUEscape := func() rune { - start := index - nextChar() - nextChar() - nextChar() - nextChar() - if globalError != nil { - return 0 - } - u16, err := strconv.ParseUint(string(jsonData[start:index]), 16, 64) - checkError(err) - return rune(u16) - } + scanFor := func(expected byte) { + c := scan() + if c != expected { + setError("Expected '" + string(expected) + "' but got '" + string(c) + "'") + } + } - testNextNonWhiteSpaceChar := func() byte { - save := index - c := scan() - index = save - return c - } + getUEscape := func() rune { + start := index + nextChar() + nextChar() + nextChar() + nextChar() + if globalError != nil { + return 0 + } + u16, err := strconv.ParseUint(string(jsonData[start:index]), 16, 64) + checkError(err) + return rune(u16) + } - decorateString := func(rawUTF8 string) string { - var quotedString strings.Builder - quotedString.WriteByte('"') - CoreLoop: - for _, c := range []byte(rawUTF8) { - // Is this within the JSON standard escapes? - for i, esc := range binaryEscapes { - if esc == c { - quotedString.WriteByte('\\') - quotedString.WriteByte(asciiEscapes[i]) - continue CoreLoop - } - } - if c < 0x20 { - // Other ASCII control characters must be escaped with \uhhhh - quotedString.WriteString(fmt.Sprintf("\\u%04x", c)) - } else { - quotedString.WriteByte(c) - } - } - quotedString.WriteByte('"') - return quotedString.String() - } + testNextNonWhiteSpaceChar := func() byte { + save := index + c := scan() + index = save + return c + } - parseQuotedString = func() string { - var rawString strings.Builder - CoreLoop: - for globalError == nil { - var c byte - if index < jsonDataLength { - c = jsonData[index] - index++ - } else { - nextChar() - break - } - if (c == '"') { - break; - } - if c < ' ' { - setError("Unterminated string literal") - } else if c == '\\' { - // Escape sequence - c = nextChar() - if c == 'u' { - // The \u escape - firstUTF16 := getUEscape() - if utf16.IsSurrogate(firstUTF16) { - // If the first UTF-16 code unit has a certain value there must be - // another succeeding UTF-16 code unit as well - if nextChar() != '\\' || nextChar() != 'u' { - setError("Missing surrogate") - } else { - // Output the UTF-32 code point as UTF-8 - rawString.WriteRune(utf16.DecodeRune(firstUTF16, getUEscape())) - } - } else { - // Single UTF-16 code identical to UTF-32. Output as UTF-8 - rawString.WriteRune(firstUTF16) - } - } else if c == '/' { - // Benign but useless escape - rawString.WriteByte('/') - } else { - // The JSON standard escapes - for i, esc := range asciiEscapes { - if esc == c { - rawString.WriteByte(binaryEscapes[i]) - continue CoreLoop - } - } - setError("Unexpected escape: \\" + string(c)) - } - } else { - // Just an ordinary ASCII character alternatively a UTF-8 byte - // outside of ASCII. - // Note that properly formatted UTF-8 never clashes with ASCII - // making byte per byte search for ASCII break characters work - // as expected. - rawString.WriteByte(c) - } - } - return rawString.String() - } + decorateString := func(rawUTF8 string) string { + var quotedString strings.Builder + quotedString.WriteByte('"') + CoreLoop: + for _, c := range []byte(rawUTF8) { + // Is this within the JSON standard escapes? + for i, esc := range binaryEscapes { + if esc == c { + quotedString.WriteByte('\\') + quotedString.WriteByte(asciiEscapes[i]) + continue CoreLoop + } + } + if c < 0x20 { + // Other ASCII control characters must be escaped with \uhhhh + quotedString.WriteString(fmt.Sprintf("\\u%04x", c)) + } else { + quotedString.WriteByte(c) + } + } + quotedString.WriteByte('"') + return quotedString.String() + } - parseSimpleType = func() string { - var token strings.Builder - index-- - for globalError == nil { - c := testNextNonWhiteSpaceChar() - if c == ',' || c == ']' || c == '}' { - break; - } - c = nextChar() - if isWhiteSpace(c) { - break - } - token.WriteByte(c) - } - if token.Len() == 0 { - setError("Missing argument") - } - value := token.String() - // Is it a JSON literal? - for _, literal := range literals { - if literal == value { - return literal - } - } - // Apparently not so we assume that it is a I-JSON number - ieeeF64, err := strconv.ParseFloat(value, 64) - checkError(err) - value, err = NumberToJSON(ieeeF64) - checkError(err) - return value - } + parseQuotedString = func() string { + var rawString strings.Builder + CoreLoop: + for globalError == nil { + var c byte + if index < jsonDataLength { + c = jsonData[index] + index++ + } else { + nextChar() + break + } + if c == '"' { + break + } + if c < ' ' { + setError("Unterminated string literal") + } else if c == '\\' { + // Escape sequence + c = nextChar() + if c == 'u' { + // The \u escape + firstUTF16 := getUEscape() + if utf16.IsSurrogate(firstUTF16) { + // If the first UTF-16 code unit has a certain value there must be + // another succeeding UTF-16 code unit as well + if nextChar() != '\\' || nextChar() != 'u' { + setError("Missing surrogate") + } else { + // Output the UTF-32 code point as UTF-8 + rawString.WriteRune(utf16.DecodeRune(firstUTF16, getUEscape())) + } + } else { + // Single UTF-16 code identical to UTF-32. Output as UTF-8 + rawString.WriteRune(firstUTF16) + } + } else if c == '/' { + // Benign but useless escape + rawString.WriteByte('/') + } else { + // The JSON standard escapes + for i, esc := range asciiEscapes { + if esc == c { + rawString.WriteByte(binaryEscapes[i]) + continue CoreLoop + } + } + setError("Unexpected escape: \\" + string(c)) + } + } else { + // Just an ordinary ASCII character alternatively a UTF-8 byte + // outside of ASCII. + // Note that properly formatted UTF-8 never clashes with ASCII + // making byte per byte search for ASCII break characters work + // as expected. + rawString.WriteByte(c) + } + } + return rawString.String() + } - parseElement = func() string { - switch scan() { - case '{': - return parseObject() - case '"': - return decorateString(parseQuotedString()) - case '[': - return parseArray() - default: - return parseSimpleType() - } - } + parseSimpleType = func() string { + var token strings.Builder + index-- + for globalError == nil { + c := testNextNonWhiteSpaceChar() + if c == ',' || c == ']' || c == '}' { + break + } + c = nextChar() + if isWhiteSpace(c) { + break + } + token.WriteByte(c) + } + if token.Len() == 0 { + setError("Missing argument") + } + value := token.String() + // Is it a JSON literal? + for _, literal := range literals { + if literal == value { + return literal + } + } + // Apparently not so we assume that it is a I-JSON number + ieeeF64, err := strconv.ParseFloat(value, 64) + checkError(err) + value, err = NumberToJSON(ieeeF64) + checkError(err) + return value + } - parseArray = func() string { - var arrayData strings.Builder - arrayData.WriteByte('[') - var next bool = false - for globalError == nil && testNextNonWhiteSpaceChar() != ']' { - if next { - scanFor(',') - arrayData.WriteByte(',') - } else { - next = true - } - arrayData.WriteString(parseElement()) - } - scan() - arrayData.WriteByte(']') - return arrayData.String() - } + parseElement = func() string { + switch scan() { + case '{': + return parseObject() + case '"': + return decorateString(parseQuotedString()) + case '[': + return parseArray() + default: + return parseSimpleType() + } + } - lexicographicallyPrecedes := func(sortKey []uint16, e *list.Element) bool { - // Find the minimum length of the sortKeys - oldSortKey := e.Value.(nameValueType).sortKey - minLength := len(oldSortKey) - if minLength > len(sortKey) { - minLength = len(sortKey) - } - for q := 0; q < minLength; q++ { - diff := int(sortKey[q]) - int(oldSortKey[q]) - if diff < 0 { - // Smaller => Precedes - return true - } else if diff > 0 { - // Bigger => No match - return false - } - // Still equal => Continue - } - // The sortKeys compared equal up to minLength - if len(sortKey) < len(oldSortKey) { - // Shorter => Precedes - return true - } - if len(sortKey) == len(oldSortKey) { - setError("Duplicate key: " + e.Value.(nameValueType).name) - } - // Longer => No match - return false - } + parseArray = func() string { + var arrayData strings.Builder + arrayData.WriteByte('[') + var next bool = false + for globalError == nil && testNextNonWhiteSpaceChar() != ']' { + if next { + scanFor(',') + arrayData.WriteByte(',') + } else { + next = true + } + arrayData.WriteString(parseElement()) + } + scan() + arrayData.WriteByte(']') + return arrayData.String() + } - parseObject = func() string { - nameValueList := list.New() - var next bool = false - CoreLoop: - for globalError == nil && testNextNonWhiteSpaceChar() != '}' { - if next { - scanFor(',') - } - next = true - scanFor('"') - rawUTF8 := parseQuotedString() - if globalError != nil { - break; - } - // Sort keys on UTF-16 code units - // Since UTF-8 doesn't have endianess this is just a value transformation - // In the Go case the transformation is UTF-8 => UTF-32 => UTF-16 - sortKey := utf16.Encode([]rune(rawUTF8)) - scanFor(':') - nameValue := nameValueType{rawUTF8, sortKey, parseElement()} - for e := nameValueList.Front(); e != nil; e = e.Next() { - // Check if the key is smaller than a previous key - if lexicographicallyPrecedes(sortKey, e) { - // Precedes => Insert before and exit sorting - nameValueList.InsertBefore(nameValue, e) - continue CoreLoop - } - // Continue searching for a possibly succeeding sortKey - // (which is straightforward since the list is ordered) - } - // The sortKey is either the first or is succeeding all previous sortKeys - nameValueList.PushBack(nameValue) - } - // Scan away '}' - scan() - // Now everything is sorted so we can properly serialize the object - var objectData strings.Builder - objectData.WriteByte('{') - next = false - for e := nameValueList.Front(); e != nil; e = e.Next() { - if next { - objectData.WriteByte(',') - } - next = true - nameValue := e.Value.(nameValueType) - objectData.WriteString(decorateString(nameValue.name)) - objectData.WriteByte(':') - objectData.WriteString(nameValue.value) - } - objectData.WriteByte('}') - return objectData.String() - } + lexicographicallyPrecedes := func(sortKey []uint16, e *list.Element) bool { + // Find the minimum length of the sortKeys + oldSortKey := e.Value.(nameValueType).sortKey + minLength := len(oldSortKey) + if minLength > len(sortKey) { + minLength = len(sortKey) + } + for q := 0; q < minLength; q++ { + diff := int(sortKey[q]) - int(oldSortKey[q]) + if diff < 0 { + // Smaller => Precedes + return true + } else if diff > 0 { + // Bigger => No match + return false + } + // Still equal => Continue + } + // The sortKeys compared equal up to minLength + if len(sortKey) < len(oldSortKey) { + // Shorter => Precedes + return true + } + if len(sortKey) == len(oldSortKey) { + setError("Duplicate key: " + e.Value.(nameValueType).name) + } + // Longer => No match + return false + } - ///////////////////////////////////////////////// - // This is where Transform actually begins... // - ///////////////////////////////////////////////// - var transformed string + parseObject = func() string { + nameValueList := list.New() + var next bool = false + CoreLoop: + for globalError == nil && testNextNonWhiteSpaceChar() != '}' { + if next { + scanFor(',') + } + next = true + scanFor('"') + rawUTF8 := parseQuotedString() + if globalError != nil { + break + } + // Sort keys on UTF-16 code units + // Since UTF-8 doesn't have endianess this is just a value transformation + // In the Go case the transformation is UTF-8 => UTF-32 => UTF-16 + sortKey := utf16.Encode([]rune(rawUTF8)) + scanFor(':') + nameValue := nameValueType{rawUTF8, sortKey, parseElement()} + for e := nameValueList.Front(); e != nil; e = e.Next() { + // Check if the key is smaller than a previous key + if lexicographicallyPrecedes(sortKey, e) { + // Precedes => Insert before and exit sorting + nameValueList.InsertBefore(nameValue, e) + continue CoreLoop + } + // Continue searching for a possibly succeeding sortKey + // (which is straightforward since the list is ordered) + } + // The sortKey is either the first or is succeeding all previous sortKeys + nameValueList.PushBack(nameValue) + } + // Scan away '}' + scan() + // Now everything is sorted so we can properly serialize the object + var objectData strings.Builder + objectData.WriteByte('{') + next = false + for e := nameValueList.Front(); e != nil; e = e.Next() { + if next { + objectData.WriteByte(',') + } + next = true + nameValue := e.Value.(nameValueType) + objectData.WriteString(decorateString(nameValue.name)) + objectData.WriteByte(':') + objectData.WriteString(nameValue.value) + } + objectData.WriteByte('}') + return objectData.String() + } - if testNextNonWhiteSpaceChar() == '[' { - scan() - transformed = parseArray() - } else { - scanFor('{') - transformed = parseObject() - } - for index < jsonDataLength { - if !isWhiteSpace(jsonData[index]) { - setError("Improperly terminated JSON object") - break; - } - index++ - } - return []byte(transformed), globalError -} \ No newline at end of file + ///////////////////////////////////////////////// + // This is where Transform actually begins... // + ///////////////////////////////////////////////// + var transformed string + + if testNextNonWhiteSpaceChar() == '[' { + scan() + transformed = parseArray() + } else { + scanFor('{') + transformed = parseObject() + } + for index < jsonDataLength { + if !isWhiteSpace(jsonData[index]) { + setError("Improperly terminated JSON object") + break + } + index++ + } + return []byte(transformed), globalError +} diff --git a/vendor/github.com/davecgh/go-spew/spew/bypass.go b/vendor/github.com/davecgh/go-spew/spew/bypass.go index 792994785e..70ddeaad3e 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypass.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypass.go @@ -18,6 +18,7 @@ // tag is deprecated and thus should not be used. // Go versions prior to 1.4 are disabled because they use a different layout // for interfaces which make the implementation of unsafeReflectValue more complex. +//go:build !js && !appengine && !safe && !disableunsafe && go1.4 // +build !js,!appengine,!safe,!disableunsafe,go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go index 205c28d68c..5e2d890d6a 100644 --- a/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go +++ b/vendor/github.com/davecgh/go-spew/spew/bypasssafe.go @@ -16,6 +16,7 @@ // when the code is running on Google App Engine, compiled by GopherJS, or // "-tags safe" is added to the go build command line. The "disableunsafe" // tag is deprecated and thus should not be used. +//go:build js || appengine || safe || disableunsafe || !go1.4 // +build js appengine safe disableunsafe !go1.4 package spew diff --git a/vendor/github.com/davecgh/go-spew/spew/config.go b/vendor/github.com/davecgh/go-spew/spew/config.go index 2e3d22f312..161895fc6d 100644 --- a/vendor/github.com/davecgh/go-spew/spew/config.go +++ b/vendor/github.com/davecgh/go-spew/spew/config.go @@ -254,15 +254,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by modifying the public members of c. See ConfigState for options documentation. @@ -295,12 +295,12 @@ func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) // NewDefaultConfig returns a ConfigState with the following default settings. // -// Indent: " " -// MaxDepth: 0 -// DisableMethods: false -// DisablePointerMethods: false -// ContinueOnMethod: false -// SortKeys: false +// Indent: " " +// MaxDepth: 0 +// DisableMethods: false +// DisablePointerMethods: false +// ContinueOnMethod: false +// SortKeys: false func NewDefaultConfig() *ConfigState { return &ConfigState{Indent: " "} } diff --git a/vendor/github.com/davecgh/go-spew/spew/doc.go b/vendor/github.com/davecgh/go-spew/spew/doc.go index aacaac6f1e..722e9aa791 100644 --- a/vendor/github.com/davecgh/go-spew/spew/doc.go +++ b/vendor/github.com/davecgh/go-spew/spew/doc.go @@ -21,35 +21,36 @@ debugging. A quick overview of the additional features spew provides over the built-in printing facilities for Go data types are as follows: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output (only when using - Dump style) + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output (only when using + Dump style) There are two different approaches spew allows for dumping Go data structures: - * Dump style which prints with newlines, customizable indentation, - and additional debug information such as types and all pointer addresses - used to indirect to the final value - * A custom Formatter interface that integrates cleanly with the standard fmt - package and replaces %v, %+v, %#v, and %#+v to provide inline printing - similar to the default %v while providing the additional functionality - outlined above and passing unsupported format verbs such as %x and %q - along to fmt + - Dump style which prints with newlines, customizable indentation, + and additional debug information such as types and all pointer addresses + used to indirect to the final value + - A custom Formatter interface that integrates cleanly with the standard fmt + package and replaces %v, %+v, %#v, and %#+v to provide inline printing + similar to the default %v while providing the additional functionality + outlined above and passing unsupported format verbs such as %x and %q + along to fmt -Quick Start +# Quick Start This section demonstrates how to quickly get started with spew. See the sections below for further details on formatting and configuration options. To dump a variable with full newlines, indentation, type, and pointer information use Dump, Fdump, or Sdump: + spew.Dump(myVar1, myVar2, ...) spew.Fdump(someWriter, myVar1, myVar2, ...) str := spew.Sdump(myVar1, myVar2, ...) @@ -58,12 +59,13 @@ Alternatively, if you would prefer to use format strings with a compacted inline printing style, use the convenience wrappers Printf, Fprintf, etc with %v (most compact), %+v (adds pointer addresses), %#v (adds types), or %#+v (adds types and pointer addresses): + spew.Printf("myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Printf("myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) spew.Fprintf(someWriter, "myVar1: %v -- myVar2: %+v", myVar1, myVar2) spew.Fprintf(someWriter, "myVar3: %#v -- myVar4: %#+v", myVar3, myVar4) -Configuration Options +# Configuration Options Configuration of spew is handled by fields in the ConfigState type. For convenience, all of the top-level functions use a global state available @@ -74,51 +76,52 @@ equivalent to the top-level functions. This allows concurrent configuration options. See the ConfigState documentation for more details. The following configuration options are available: - * Indent - String to use for each indentation level for Dump functions. - It is a single space by default. A popular alternative is "\t". - - * MaxDepth - Maximum number of levels to descend into nested data structures. - There is no limit by default. - - * DisableMethods - Disables invocation of error and Stringer interface methods. - Method invocation is enabled by default. - - * DisablePointerMethods - Disables invocation of error and Stringer interface methods on types - which only accept pointer receivers from non-pointer variables. - Pointer method invocation is enabled by default. - - * DisablePointerAddresses - DisablePointerAddresses specifies whether to disable the printing of - pointer addresses. This is useful when diffing data structures in tests. - - * DisableCapacities - DisableCapacities specifies whether to disable the printing of - capacities for arrays, slices, maps and channels. This is useful when - diffing data structures in tests. - - * ContinueOnMethod - Enables recursion into types after invoking error and Stringer interface - methods. Recursion after method invocation is disabled by default. - - * SortKeys - Specifies map keys should be sorted before being printed. Use - this to have a more deterministic, diffable output. Note that - only native types (bool, int, uint, floats, uintptr and string) - and types which implement error or Stringer interfaces are - supported with other types sorted according to the - reflect.Value.String() output which guarantees display - stability. Natural map order is used by default. - - * SpewKeys - Specifies that, as a last resort attempt, map keys should be - spewed to strings and sorted by those strings. This is only - considered if SortKeys is true. - -Dump Usage + + - Indent + String to use for each indentation level for Dump functions. + It is a single space by default. A popular alternative is "\t". + + - MaxDepth + Maximum number of levels to descend into nested data structures. + There is no limit by default. + + - DisableMethods + Disables invocation of error and Stringer interface methods. + Method invocation is enabled by default. + + - DisablePointerMethods + Disables invocation of error and Stringer interface methods on types + which only accept pointer receivers from non-pointer variables. + Pointer method invocation is enabled by default. + + - DisablePointerAddresses + DisablePointerAddresses specifies whether to disable the printing of + pointer addresses. This is useful when diffing data structures in tests. + + - DisableCapacities + DisableCapacities specifies whether to disable the printing of + capacities for arrays, slices, maps and channels. This is useful when + diffing data structures in tests. + + - ContinueOnMethod + Enables recursion into types after invoking error and Stringer interface + methods. Recursion after method invocation is disabled by default. + + - SortKeys + Specifies map keys should be sorted before being printed. Use + this to have a more deterministic, diffable output. Note that + only native types (bool, int, uint, floats, uintptr and string) + and types which implement error or Stringer interfaces are + supported with other types sorted according to the + reflect.Value.String() output which guarantees display + stability. Natural map order is used by default. + + - SpewKeys + Specifies that, as a last resort attempt, map keys should be + spewed to strings and sorted by those strings. This is only + considered if SortKeys is true. + +# Dump Usage Simply call spew.Dump with a list of variables you want to dump: @@ -133,7 +136,7 @@ A third option is to call spew.Sdump to get the formatted output as a string: str := spew.Sdump(myVar1, myVar2, ...) -Sample Dump Output +# Sample Dump Output See the Dump example for details on the setup of the types and variables being shown here. @@ -150,13 +153,14 @@ shown here. Byte (and uint8) arrays and slices are displayed uniquely like the hexdump -C command as shown. + ([]uint8) (len=32 cap=32) { 00000000 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 |............... | 00000010 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 |!"#$%&'()*+,-./0| 00000020 31 32 |12| } -Custom Formatter +# Custom Formatter Spew provides a custom formatter that implements the fmt.Formatter interface so that it integrates cleanly with standard fmt package printing functions. The @@ -170,7 +174,7 @@ standard fmt package for formatting. In addition, the custom formatter ignores the width and precision arguments (however they will still work on the format specifiers not handled by the custom formatter). -Custom Formatter Usage +# Custom Formatter Usage The simplest way to make use of the spew custom formatter is to call one of the convenience functions such as spew.Printf, spew.Println, or spew.Printf. The @@ -184,15 +188,17 @@ functions have syntax you are most likely already familiar with: See the Index for the full list convenience functions. -Sample Formatter Output +# Sample Formatter Output Double pointer to a uint8: + %v: <**>5 %+v: <**>(0xf8400420d0->0xf8400420c8)5 %#v: (**uint8)5 %#+v: (**uint8)(0xf8400420d0->0xf8400420c8)5 Pointer to circular struct with a uint8 field and a pointer to itself: + %v: <*>{1 <*>} %+v: <*>(0xf84003e260){ui8:1 c:<*>(0xf84003e260)} %#v: (*main.circular){ui8:(uint8)1 c:(*main.circular)} @@ -201,7 +207,7 @@ Pointer to circular struct with a uint8 field and a pointer to itself: See the Printf example for details on the setup of variables being shown here. -Errors +# Errors Since it is possible for custom Stringer/error interfaces to panic, spew detects them and handles them internally by printing the panic information diff --git a/vendor/github.com/davecgh/go-spew/spew/dump.go b/vendor/github.com/davecgh/go-spew/spew/dump.go index f78d89fc1f..8323041a48 100644 --- a/vendor/github.com/davecgh/go-spew/spew/dump.go +++ b/vendor/github.com/davecgh/go-spew/spew/dump.go @@ -488,15 +488,15 @@ pointer addresses used to indirect to the final value. It provides the following features over the built-in printing facilities provided by the fmt package: - * Pointers are dereferenced and followed - * Circular data structures are detected and handled properly - * Custom Stringer/error interfaces are optionally invoked, including - on unexported types - * Custom types which only implement the Stringer/error interfaces via - a pointer receiver are optionally invoked when passing non-pointer - variables - * Byte arrays and slices are dumped like the hexdump -C command which - includes offsets, byte values in hex, and ASCII output + - Pointers are dereferenced and followed + - Circular data structures are detected and handled properly + - Custom Stringer/error interfaces are optionally invoked, including + on unexported types + - Custom types which only implement the Stringer/error interfaces via + a pointer receiver are optionally invoked when passing non-pointer + variables + - Byte arrays and slices are dumped like the hexdump -C command which + includes offsets, byte values in hex, and ASCII output The configuration options are controlled by an exported package global, spew.Config. See ConfigState for options documentation. diff --git a/vendor/github.com/emicklei/go-restful/v3/curly.go b/vendor/github.com/emicklei/go-restful/v3/curly.go index 6fd2bcd5a1..87fd99e1b1 100644 --- a/vendor/github.com/emicklei/go-restful/v3/curly.go +++ b/vendor/github.com/emicklei/go-restful/v3/curly.go @@ -168,7 +168,7 @@ func (c CurlyRouter) computeWebserviceScore(requestTokens []string, routeTokens if matchesToken { score++ // extra score for regex match } - } + } } else { // not a parameter if eachRequestToken != eachRouteToken { diff --git a/vendor/github.com/emicklei/go-restful/v3/doc.go b/vendor/github.com/emicklei/go-restful/v3/doc.go index 69b13057d0..5bdb9bb186 100644 --- a/vendor/github.com/emicklei/go-restful/v3/doc.go +++ b/vendor/github.com/emicklei/go-restful/v3/doc.go @@ -1,7 +1,7 @@ /* Package restful , a lean package for creating REST-style WebServices without magic. -WebServices and Routes +# WebServices and Routes A WebService has a collection of Route objects that dispatch incoming Http Requests to a function calls. Typically, a WebService has a root path (e.g. /users) and defines common MIME types for its routes. @@ -30,14 +30,14 @@ The (*Request, *Response) arguments provide functions for reading information fr See the example https://github.com/emicklei/go-restful/blob/v3/examples/user-resource/restful-user-resource.go with a full implementation. -Regular expression matching Routes +# Regular expression matching Routes A Route parameter can be specified using the format "uri/{var[:regexp]}" or the special version "uri/{var:*}" for matching the tail of the path. For example, /persons/{name:[A-Z][A-Z]} can be used to restrict values for the parameter "name" to only contain capital alphabetic characters. Regular expressions must use the standard Go syntax as described in the regexp package. (https://code.google.com/p/re2/wiki/Syntax) This feature requires the use of a CurlyRouter. -Containers +# Containers A Container holds a collection of WebServices, Filters and a http.ServeMux for multiplexing http requests. Using the statements "restful.Add(...) and restful.Filter(...)" will register WebServices and Filters to the Default Container. @@ -47,7 +47,7 @@ You can create your own Container and create a new http.Server for that particul container := restful.NewContainer() server := &http.Server{Addr: ":8081", Handler: container} -Filters +# Filters A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. You can use filters to perform generic logging, measurement, authentication, redirect, set response headers etc. @@ -60,22 +60,21 @@ Use the following statement to pass the request,response pair to the next filter chain.ProcessFilter(req, resp) -Container Filters +# Container Filters These are processed before any registered WebService. // install a (global) filter for the default container (processed before any webservice) restful.Filter(globalLogging) -WebService Filters +# WebService Filters These are processed before any Route of a WebService. // install a webservice filter (processed before any route) ws.Filter(webserviceLogging).Filter(measureTime) - -Route Filters +# Route Filters These are processed before calling the function associated with the Route. @@ -84,7 +83,7 @@ These are processed before calling the function associated with the Route. See the example https://github.com/emicklei/go-restful/blob/v3/examples/filters/restful-filters.go with full implementations. -Response Encoding +# Response Encoding Two encodings are supported: gzip and deflate. To enable this for all responses: @@ -95,20 +94,20 @@ Alternatively, you can create a Filter that performs the encoding and install it See the example https://github.com/emicklei/go-restful/blob/v3/examples/encoding/restful-encoding-filter.go -OPTIONS support +# OPTIONS support By installing a pre-defined container filter, your Webservice(s) can respond to the OPTIONS Http request. Filter(OPTIONSFilter()) -CORS +# CORS By installing the filter of a CrossOriginResourceSharing (CORS), your WebService(s) can handle CORS requests. cors := CrossOriginResourceSharing{ExposeHeaders: []string{"X-My-Header"}, CookiesAllowed: false, Container: DefaultContainer} Filter(cors.Filter) -Error Handling +# Error Handling Unexpected things happen. If a request cannot be processed because of a failure, your service needs to tell via the response what happened and why. For this reason HTTP status codes exist and it is important to use the correct code in every exceptional situation. @@ -137,11 +136,11 @@ The request does not have or has an unknown Accept Header set for this operation The request does not have or has an unknown Content-Type Header set for this operation. -ServiceError +# ServiceError In addition to setting the correct (error) Http status code, you can choose to write a ServiceError message on the response. -Performance options +# Performance options This package has several options that affect the performance of your service. It is important to understand them and how you can change it. @@ -156,30 +155,27 @@ Default value is true If content encoding is enabled then the default strategy for getting new gzip/zlib writers and readers is to use a sync.Pool. Because writers are expensive structures, performance is even more improved when using a preloaded cache. You can also inject your own implementation. -Trouble shooting +# Trouble shooting This package has the means to produce detail logging of the complete Http request matching process and filter invocation. Enabling this feature requires you to set an implementation of restful.StdLogger (e.g. log.Logger) instance such as: restful.TraceLogger(log.New(os.Stdout, "[restful] ", log.LstdFlags|log.Lshortfile)) -Logging +# Logging The restful.SetLogger() method allows you to override the logger used by the package. By default restful uses the standard library `log` package and logs to stdout. Different logging packages are supported as long as they conform to `StdLogger` interface defined in the `log` sub-package, writing an adapter for your preferred package is simple. -Resources +# Resources -[project]: https://github.com/emicklei/go-restful +(c) 2012-2015, http://ernestmicklei.com. MIT License +[project]: https://github.com/emicklei/go-restful [examples]: https://github.com/emicklei/go-restful/blob/master/examples - -[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ - +[design]: http://ernestmicklei.com/2012/11/11/go-restful-api-design/ [showcases]: https://github.com/emicklei/mora, https://github.com/emicklei/landskape - -(c) 2012-2015, http://ernestmicklei.com. MIT License */ package restful diff --git a/vendor/github.com/emicklei/go-restful/v3/response.go b/vendor/github.com/emicklei/go-restful/v3/response.go index a41a92cc2c..09fb3c7528 100644 --- a/vendor/github.com/emicklei/go-restful/v3/response.go +++ b/vendor/github.com/emicklei/go-restful/v3/response.go @@ -14,7 +14,7 @@ import ( // DefaultResponseMimeType is DEPRECATED, use DefaultResponseContentType(mime) var DefaultResponseMimeType string -//PrettyPrintResponses controls the indentation feature of XML and JSON serialization +// PrettyPrintResponses controls the indentation feature of XML and JSON serialization var PrettyPrintResponses = true // Response is a wrapper on the actual http ResponseWriter @@ -40,7 +40,8 @@ func NewResponse(httpWriter http.ResponseWriter) *Response { // If Accept header matching fails, fall back to this type. // Valid values are restful.MIME_JSON and restful.MIME_XML // Example: -// restful.DefaultResponseContentType(restful.MIME_JSON) +// +// restful.DefaultResponseContentType(restful.MIME_JSON) func DefaultResponseContentType(mime string) { DefaultResponseMimeType = mime } diff --git a/vendor/github.com/emicklei/go-restful/v3/web_service.go b/vendor/github.com/emicklei/go-restful/v3/web_service.go index 789c4df259..336a0bc2c9 100644 --- a/vendor/github.com/emicklei/go-restful/v3/web_service.go +++ b/vendor/github.com/emicklei/go-restful/v3/web_service.go @@ -188,20 +188,20 @@ func (w *WebService) Route(builder *RouteBuilder) *WebService { // RemoveRoute removes the specified route, looks for something that matches 'path' and 'method' func (w *WebService) RemoveRoute(path, method string) error { - if !w.dynamicRoutes { - return errors.New("dynamic routes are not enabled.") - } - w.routesLock.Lock() - defer w.routesLock.Unlock() - newRoutes := []Route{} - for _, route := range w.routes { - if route.Method == method && route.Path == path { - continue - } - newRoutes = append(newRoutes, route) - } - w.routes = newRoutes - return nil + if !w.dynamicRoutes { + return errors.New("dynamic routes are not enabled.") + } + w.routesLock.Lock() + defer w.routesLock.Unlock() + newRoutes := []Route{} + for _, route := range w.routes { + if route.Method == method && route.Path == path { + continue + } + newRoutes = append(newRoutes, route) + } + w.routes = newRoutes + return nil } // Method creates a new RouteBuilder and initialize its http method diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go index 101cedde67..cffd3d0526 100644 --- a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go +++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go @@ -1,4 +1,6 @@ +//go:build go1.8 // +build go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go index e0951df152..c5ae196621 100644 --- a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go +++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go @@ -1,4 +1,6 @@ +//go:build !go1.8 // +build !go1.8 + // Code generated by "httpsnoop/codegen"; DO NOT EDIT. package httpsnoop diff --git a/vendor/github.com/go-air/gini/doc.go b/vendor/github.com/go-air/gini/doc.go index 44f1226be2..4290e22ea8 100644 --- a/vendor/github.com/go-air/gini/doc.go +++ b/vendor/github.com/go-air/gini/doc.go @@ -5,19 +5,19 @@ // // Package gini contains both libraries and commands. The libraries include // -// - A high quality, core single goroutine SAT solver (internal package xo). -// - Concurrent solving utilities (gini/ax, ...) -// - CRISP-1.0 client and server (gini/crisp) -// - Generators (gini/gen) -// - benchmarking library (gini/bench) -// - scoped assumptions -// - logic library -// ... +// - A high quality, core single goroutine SAT solver (internal package xo). +// - Concurrent solving utilities (gini/ax, ...) +// - CRISP-1.0 client and server (gini/crisp) +// - Generators (gini/gen) +// - benchmarking library (gini/bench) +// - scoped assumptions +// - logic library +// ... // // The commands include // -// - gini, a command for solving SAT problems in cnf and icnf formats, and a -// CRISP-1.0 client. -// - bench, a utility for constructing, running, and comparing benchmarks -// - crispd, CRISP-1.0 server +// - gini, a command for solving SAT problems in cnf and icnf formats, and a +// CRISP-1.0 client. +// - bench, a utility for constructing, running, and comparing benchmarks +// - crispd, CRISP-1.0 server package gini diff --git a/vendor/github.com/go-air/gini/gini.go b/vendor/github.com/go-air/gini/gini.go index 5f32dc8e8b..d54853f205 100644 --- a/vendor/github.com/go-air/gini/gini.go +++ b/vendor/github.com/go-air/gini/gini.go @@ -95,14 +95,13 @@ func (g *Gini) Lit() z.Lit { // Add implements inter.S. To add a clause (x + y + z), // one calls // -// g.Add(x) -// g.Add(y) -// g.Add(z) -// g.Add(0) +// g.Add(x) +// g.Add(y) +// g.Add(z) +// g.Add(0) // // If Add is called under a test scope, then Add will panic // if `m` is 0/LitNull. -// func (g *Gini) Add(m z.Lit) { g.xo.Add(m) } @@ -126,9 +125,10 @@ func (g *Gini) Solve() int { } // Try solves with a timeout. Try returns -// 1 if sat -// -1 if unsat -// 0 if timeout +// +// 1 if sat +// -1 if unsat +// 0 if timeout func (g *Gini) Try(dur time.Duration) int { return g.xo.Try(dur) } @@ -163,15 +163,17 @@ func (g *Gini) Why(ms []z.Lit) []z.Lit { // and opens a scope for future assumptions. // // Test returns the result of BCP res -// (1: SAT, -1: UNSAT: 0, UNKNOWN) +// +// (1: SAT, -1: UNSAT: 0, UNKNOWN) +// // And any associated data in out. The data tries to use dst // for storage if there is space. // // The associated data is // -// - All assigned literals since last test if SAT or UNKNOWN -// - Either the literals of a clause which is unsat under BCP or an assumption -// which is false under BCP, whichever is found first. +// - All assigned literals since last test if SAT or UNKNOWN +// - Either the literals of a clause which is unsat under BCP or an assumption +// which is false under BCP, whichever is found first. // // When g is under a test scope, many operations are not // possible, in particular: {Add,Activate,ActivateWith,Deactivate} @@ -218,19 +220,19 @@ func (g *Gini) Reasons(dst []z.Lit, m z.Lit) []z.Lit { // // Example: // -// if g.Value(a) != false || g.Value(b) != false { -// g.Add(a) -// g.Add(b) -// m := g.Activate() // don't call g.Add(0). -// g.Assume(m) // now the clause (a + b) is active -// if g.Solve() == 1 { -// // do something -// } -// // now the clause (a+b) is not active. -// g.Deactivate(m) -// // now `m` can be re-used and the solver can ignore -// // clauses with `m`. -// } +// if g.Value(a) != false || g.Value(b) != false { +// g.Add(a) +// g.Add(b) +// m := g.Activate() // don't call g.Add(0). +// g.Assume(m) // now the clause (a + b) is active +// if g.Solve() == 1 { +// // do something +// } +// // now the clause (a+b) is not active. +// g.Deactivate(m) +// // now `m` can be re-used and the solver can ignore +// // clauses with `m`. +// } // // Activation of all clauses can be used in conjunction with cardinality constraints // to easily create a MAXSAT solver. diff --git a/vendor/github.com/go-air/gini/inter/doc.go b/vendor/github.com/go-air/gini/inter/doc.go index 7306a12695..9de84d867e 100644 --- a/vendor/github.com/go-air/gini/inter/doc.go +++ b/vendor/github.com/go-air/gini/inter/doc.go @@ -7,5 +7,4 @@ // The inter package is designed with facets of solving interfaces. Facets for // solve processes, models, assumptions, scoping, and asynchronous solves are // provided. -// package inter diff --git a/vendor/github.com/go-air/gini/inter/s.go b/vendor/github.com/go-air/gini/inter/s.go index 248068d11f..b77a5c6090 100644 --- a/vendor/github.com/go-air/gini/inter/s.go +++ b/vendor/github.com/go-air/gini/inter/s.go @@ -14,9 +14,9 @@ import ( // // Solve/Try returns // -// 1 If the problem is SAT -// 0 If the problem is undetermined (Try only) -// -1 If the problem is UNSAT +// 1 If the problem is SAT +// 0 If the problem is undetermined (Try only) +// -1 If the problem is UNSAT // // These error codes are used throughout gini. type Solvable interface { @@ -54,7 +54,6 @@ type MaxVar interface { // Liter produces fresh variables and returns the corresponding // positive literal. -// type Liter interface { Lit() z.Lit } diff --git a/vendor/github.com/go-air/gini/inter/solve.go b/vendor/github.com/go-air/gini/inter/solve.go index 77ecf3bd46..3170696244 100644 --- a/vendor/github.com/go-air/gini/inter/solve.go +++ b/vendor/github.com/go-air/gini/inter/solve.go @@ -18,7 +18,7 @@ import "time" // and several caveats must be respected: // // 1. Once a result from the underlying Solve() is obtained, Solve should -// no longer be used. +// no longer be used. // 2. Every successful Pause() should be followed by Unpause before trying to // obtain a result. // 3. Every unsucessful Pause should not be followed by a corresponding diff --git a/vendor/github.com/go-air/gini/internal/xo/cdat.go b/vendor/github.com/go-air/gini/internal/xo/cdat.go index b97be0075b..cf5ddd95e9 100644 --- a/vendor/github.com/go-air/gini/internal/xo/cdat.go +++ b/vendor/github.com/go-air/gini/internal/xo/cdat.go @@ -23,19 +23,18 @@ type CDat struct { // The Layout is as follows // -// Each clause is indexed by a z.C, which is a uint32 index into CDat.D. The location is -// the beginning of the list of literals in the clause, which is terminated by z.LitNull. -// Each location is preceded by a Chd giving clause metadata. Since the underlying type of -// Chd and z.Lit are uint32, this is fine. +// Each clause is indexed by a z.C, which is a uint32 index into CDat.D. The location is +// the beginning of the list of literals in the clause, which is terminated by z.LitNull. +// Each location is preceded by a Chd giving clause metadata. Since the underlying type of +// Chd and z.Lit are uint32, this is fine. // -// Rather than allocate lots of bits in the Chd to the size, we only allocate 5 bits (max size -// of 31). For each actual size s, we store +// Rather than allocate lots of bits in the Chd to the size, we only allocate 5 bits (max size +// of 31). For each actual size s, we store // -// s & 31 -// -// To find the end of a clause at a given location, we iterate through the possible sizes -// with the same modulus, which is usually 1 operation. +// s & 31 // +// To find the end of a clause at a given location, we iterate through the possible sizes +// with the same modulus, which is usually 1 operation. func NewCDat(cap int) *CDat { if cap < 3 { cap = 3 @@ -115,7 +114,6 @@ func (c *CDat) CompactReady(nc, nl int) bool { // // 1. remap every removed clause in rm to CNull // 2. remap every moved clause -// func (c *CDat) Compact(rm []z.C) (map[z.C]z.C, int) { if len(rm) == 0 { return make(map[z.C]z.C, 0), 0 diff --git a/vendor/github.com/go-air/gini/internal/xo/cgc.go b/vendor/github.com/go-air/gini/internal/xo/cgc.go index 01c7d6451b..6bfd9e534b 100644 --- a/vendor/github.com/go-air/gini/internal/xo/cgc.go +++ b/vendor/github.com/go-air/gini/internal/xo/cgc.go @@ -117,7 +117,7 @@ func uniq(cs []z.C) []z.C { // Compact runs a clause gc, which in turn sometimes // compacts the underlying CDat. Compact returns // -// (num clauses removed, num clauses cdat removed, num freed uint32s) +// (num clauses removed, num clauses cdat removed, num freed uint32s) func (c *Cgc) Compact(cdb *Cdb) (int, int, int) { c.stCompacts++ c.stopWatch = c.luby.Next() * c.factor diff --git a/vendor/github.com/go-air/gini/internal/xo/ctl.go b/vendor/github.com/go-air/gini/internal/xo/ctl.go index dc267a2dd5..ff5506421b 100644 --- a/vendor/github.com/go-air/gini/internal/xo/ctl.go +++ b/vendor/github.com/go-air/gini/internal/xo/ctl.go @@ -77,10 +77,9 @@ func (c *Ctl) stop() int { // and returns it together with whether the // underlying Solve() has terminated. Test returns // -// - 1 for SAT -// - -1 for UNSAT -// - 0 for UNKNOWN -// +// - 1 for SAT +// - -1 for UNSAT +// - 0 for UNKNOWN func (c *Ctl) Test() (result int, done bool) { c.mu.Lock() defer c.mu.Unlock() diff --git a/vendor/github.com/go-air/gini/internal/xo/doc.go b/vendor/github.com/go-air/gini/internal/xo/doc.go index f1deb079c6..66a1a4b3c6 100644 --- a/vendor/github.com/go-air/gini/internal/xo/doc.go +++ b/vendor/github.com/go-air/gini/internal/xo/doc.go @@ -12,7 +12,7 @@ // // That said, this solver is organised as follows. // -// Variables and Literals +// # Variables and Literals // // Variables (type Var) are uint32, starting at offset 1 ending at 2^30 - 1. // Each variable can either have value true or false, represented by sign @@ -21,22 +21,21 @@ // Literals (type Lit) are uint32, starting at 2, ending at 2^31 - 1. // Literals are either variables or their negation. // -// // Clauses // -// Clauses are constraints in the form of disjunctions of literals. +// Clauses are constraints in the form of disjunctions of literals. // // Clauses have a complicated representation for efficiency reasons clauses // have an underlying data store, (type CDat in cdat.go), which is one big // slice of 32bit values, most of which are Lits. A compact header (32bit, // type Chd) contains some metadata for each clause. // -// - whether the clause is learnt -// - the literal block distance of the +// - whether the clause is learnt +// - the literal block distance of the // clause (number of non deterministic branches it spanned when created, if // learnt) -// - an abstraction of the size of the clause -// - "heat", a heuristic score of activity in solving. +// - an abstraction of the size of the clause +// - "heat", a heuristic score of activity in solving. // // Each clause is also associated with a z.C, which is a 32bit offset into // the data store slice of lits. This is the identifier for a clause, which @@ -45,10 +44,10 @@ // // Each z.C p points to data layed out as follows. // -// [... Chd lit0 lit1 ... litn LitNull] -// p +// [... Chd lit0 lit1 ... litn LitNull] +// p // -// Solving +// # Solving // // Solving is a depth first search over the (exponential) space of variable // assignments. As the search takes place the value of the clauses in the @@ -83,16 +82,16 @@ // This depth first search has the following major components, in term of code // organisation. // -// - Guess (type Guess, in guess.go) guessing variables and associated values -// during the search (for example, guessing x=1 in the search above). +// - Guess (type Guess, in guess.go) guessing variables and associated values +// during the search (for example, guessing x=1 in the search above). // -// - Trail manages the assignment stack and propagation of constraints. +// - Trail manages the assignment stack and propagation of constraints. // -// - Derive learns new clauses whenever the search reaches a point which cannot be -// extended because some clause is false. The new clauses prune the future -// search space more than just backtracking. +// - Derive learns new clauses whenever the search reaches a point which cannot be +// extended because some clause is false. The new clauses prune the future +// search space more than just backtracking. // -// Constraint propagation +// # Constraint propagation // // Constraint propagation is the most optimised and difficult to manage part // of the code. It uses "watch lists", which associates 2 literals with every @@ -100,7 +99,7 @@ // falsified in the search, the clause is examined to see whether or not it // implies a new value for a variable or if it is false. // -// Important Heuristics +// # Important Heuristics // // Variable ordering in Guess is extremely important to solving time. // Variables are re-ordered dynamically according to an approximation of their @@ -111,16 +110,16 @@ // luby series and removes approximately half of the learnted clauses in each // CGC. // -// Variable naming +// # Variable naming // // Gini uses regular succint variable naming where possible to aid in // readability and succintness // -// - Lit; m,n,o -// - Var: u,v -// - z.C: p,q,r -// - Watch: w - -// - Slices ([]): add an s on the end of underlying type -// - Slice indices: i,j,k -// - Chd: h +// - Lit; m,n,o +// - Var: u,v +// - z.C: p,q,r +// - Watch: w - +// - Slices ([]): add an s on the end of underlying type +// - Slice indices: i,j,k +// - Chd: h package xo diff --git a/vendor/github.com/go-air/gini/internal/xo/s.go b/vendor/github.com/go-air/gini/internal/xo/s.go index 9f7d865693..7024e395a7 100644 --- a/vendor/github.com/go-air/gini/internal/xo/s.go +++ b/vendor/github.com/go-air/gini/internal/xo/s.go @@ -316,34 +316,33 @@ func (s *S) Value(m z.Lit) bool { // // Test returns a pair // -// (res, ns) +// (res, ns) // // where // -// - If res == 1, then the problem is SAT and a full model is found. -// - If res == 0, then the problem is unknown (but consistent under unit -// propagation). -// - If res == -1 then the problem is UNSAT. +// - If res == 1, then the problem is SAT and a full model is found. +// - If res == 0, then the problem is unknown (but consistent under unit +// propagation). +// - If res == -1 then the problem is UNSAT. // // Additionally if ns is not nil, then // -// - If res in {0,1}, then ns -// contains all literals assigned under BCP since last Test(), including -// assumptions. -// - If res = -1, then ns contains the literals in a clause -// which is false under unit propagation, or an assumed false literal, whichever -// we happen upon first. (This is distinct from Why which gives failed literals). -// - ns is stored in ms if possible +// - If res in {0,1}, then ns +// contains all literals assigned under BCP since last Test(), including +// assumptions. +// - If res = -1, then ns contains the literals in a clause +// which is false under unit propagation, or an assumed false literal, whichever +// we happen upon first. (This is distinct from Why which gives failed literals). +// - ns is stored in ms if possible // // Test operates under the following caveat. // -// If Test() or Solve() returns unsat, then Test() should not -// be called subsequently until Untest() is called and returns 0. Note -// That it can be that Untest() will never return 0 if the problem is unsat -// without assumptions. +// If Test() or Solve() returns unsat, then Test() should not +// be called subsequently until Untest() is called and returns 0. Note +// That it can be that Untest() will never return 0 if the problem is unsat +// without assumptions. // // If this does not hold, Test panics. -// func (s *S) Test(ms []z.Lit) (res int, ns []z.Lit) { //fmt.Printf("test\n") ns = ms @@ -392,24 +391,24 @@ func (s *S) Test(ms []z.Lit) (res int, ns []z.Lit) { // Note that when interleaving Solve,Test,and Untest, the // following sequences are possible: // -// Assume(A1) -// Test() -> 0, [] -// Assume(A2) -// Test() -> 0 -// Assume(A3) -// Solve() -1 -// Untest() -> -1, [] // problem is unsat with A1 and A2 -// Untest() -> -1, [] // problem is unsat with A1 under BCP, even though it wasn't before +// Assume(A1) +// Test() -> 0, [] +// Assume(A2) +// Test() -> 0 +// Assume(A3) +// Solve() -1 +// Untest() -> -1, [] // problem is unsat with A1 and A2 +// Untest() -> -1, [] // problem is unsat with A1 under BCP, even though it wasn't before // -// Assume(A1) -// Test() -> 0, [...] -// Solve() -> -1 // unsat under A1 -// Untest() -> 0 -// Assume(A2) -> -// Test() -> 1 // sat under A2 -// Untest() -> 0 -// Assume(A1) -// Test() -> -1, [] // problem is unsat with A1 under BCP, even though it wasn't before +// Assume(A1) +// Test() -> 0, [...] +// Solve() -> -1 // unsat under A1 +// Untest() -> 0 +// Assume(A2) -> +// Test() -> 1 // sat under A2 +// Untest() -> 0 +// Assume(A1) +// Test() -> -1, [] // problem is unsat with A1 under BCP, even though it wasn't before func (s *S) Untest() int { if len(s.testLevels) == 0 { panic("Untest without Test") @@ -436,8 +435,9 @@ func (s *S) Untest() int { // returned from test. // // Reasons takes 2 arguments, -// dst a z.Lit slice in which to place the reasons -// m the literal for which to supply reasons. +// +// dst a z.Lit slice in which to place the reasons +// m the literal for which to supply reasons. // // Reasons returns the reasons for m appended to // dst. diff --git a/vendor/github.com/go-air/gini/internal/xo/tracer.go b/vendor/github.com/go-air/gini/internal/xo/tracer.go index 5dc889db01..d54ce4db25 100644 --- a/vendor/github.com/go-air/gini/internal/xo/tracer.go +++ b/vendor/github.com/go-air/gini/internal/xo/tracer.go @@ -3,7 +3,6 @@ package xo -// type Tracer interface { Add(m int) Remove(i int) diff --git a/vendor/github.com/go-air/gini/logic/c.go b/vendor/github.com/go-air/gini/logic/c.go index c42c9e582c..dda559735e 100644 --- a/vendor/github.com/go-air/gini/logic/c.go +++ b/vendor/github.com/go-air/gini/logic/c.go @@ -325,15 +325,16 @@ func (c *C) Xor(a, b z.Lit) z.Lit { } // Choice constructs a literal which is equivalent to -// if i then t else e +// +// if i then t else e func (c *C) Choice(i, t, e z.Lit) z.Lit { return c.Or(c.And(i, t), c.And(i.Not(), e)) } // Ins returns the children/ operands of m. // -// If m is an input, then, Ins returns z.LitNull, z.LitNull -// If m is an and, then Ins returns the two conjuncts +// If m is an input, then, Ins returns z.LitNull, z.LitNull +// If m is an and, then Ins returns the two conjuncts func (c *C) Ins(m z.Lit) (z.Lit, z.Lit) { v := m.Var() n := c.nodes[v] diff --git a/vendor/github.com/go-air/gini/logic/card.go b/vendor/github.com/go-air/gini/logic/card.go index 2f8a074ce4..da444fcce9 100644 --- a/vendor/github.com/go-air/gini/logic/card.go +++ b/vendor/github.com/go-air/gini/logic/card.go @@ -19,7 +19,7 @@ type Card interface { // CardSort provides cardinality constraints via sorting networks. // -// Sorting Networks +// # Sorting Networks // // CardSort uses sorting networks which implement O log(|ms|)**2 compare/swap // to sort |ms| literals. Each compare/swap is coded symbolically and generates @@ -46,7 +46,6 @@ type CardSort struct { // NewCardSort creates a new Card object which gives access to unary Cardinality // constraints over ms. The resulting predicates reflect how many of the literals // in ms are true. -// func NewCardSort(ms []z.Lit, c *C) *CardSort { p := uint(0) for 1<

(/path/to/foo, true) -// /path/to/bar -> (/path/to/bar, false) +// ex: +// /path/to/foo/... -> (/path/to/foo, true) +// /path/to/bar -> (/path/to/bar, false) func parseInput(path string) bindata.InputConfig { if strings.HasSuffix(path, "/...") { return bindata.InputConfig{ diff --git a/vendor/github.com/go-bindata/go-bindata/v3/go-bindata/version.go b/vendor/github.com/go-bindata/go-bindata/v3/go-bindata/version.go index 65b7312fc1..116435d010 100644 --- a/vendor/github.com/go-bindata/go-bindata/v3/go-bindata/version.go +++ b/vendor/github.com/go-bindata/go-bindata/v3/go-bindata/version.go @@ -18,7 +18,7 @@ const ( // revision part of the program version. // This will be set automatically at build time like so: // -// go build -ldflags "-X main.AppVersionRev `date -u +%s`" +// go build -ldflags "-X main.AppVersionRev `date -u +%s`" var AppVersionRev string func Version() string { diff --git a/vendor/github.com/go-bindata/go-bindata/v3/tools.go b/vendor/github.com/go-bindata/go-bindata/v3/tools.go index 583a046439..8249fec4de 100644 --- a/vendor/github.com/go-bindata/go-bindata/v3/tools.go +++ b/vendor/github.com/go-bindata/go-bindata/v3/tools.go @@ -1,3 +1,4 @@ +//go:build tools // +build tools package tools diff --git a/vendor/github.com/go-git/gcfg/doc.go b/vendor/github.com/go-git/gcfg/doc.go index 7bdefbf020..3b05c96c31 100644 --- a/vendor/github.com/go-git/gcfg/doc.go +++ b/vendor/github.com/go-git/gcfg/doc.go @@ -4,29 +4,29 @@ // This package is still a work in progress; see the sections below for planned // changes. // -// Syntax +// # Syntax // // The syntax is based on that used by git config: // http://git-scm.com/docs/git-config#_syntax . // There are some (planned) differences compared to the git config format: -// - improve data portability: -// - must be encoded in UTF-8 (for now) and must not contain the 0 byte -// - include and "path" type is not supported -// (path type may be implementable as a user-defined type) -// - internationalization -// - section and variable names can contain unicode letters, unicode digits -// (as defined in http://golang.org/ref/spec#Characters ) and hyphens -// (U+002D), starting with a unicode letter -// - disallow potentially ambiguous or misleading definitions: -// - `[sec.sub]` format is not allowed (deprecated in gitconfig) -// - `[sec ""]` is not allowed -// - use `[sec]` for section name "sec" and empty subsection name -// - (planned) within a single file, definitions must be contiguous for each: -// - section: '[secA]' -> '[secB]' -> '[secA]' is an error -// - subsection: '[sec "A"]' -> '[sec "B"]' -> '[sec "A"]' is an error -// - multivalued variable: 'multi=a' -> 'other=x' -> 'multi=b' is an error -// -// Data structure +// - improve data portability: +// - must be encoded in UTF-8 (for now) and must not contain the 0 byte +// - include and "path" type is not supported +// (path type may be implementable as a user-defined type) +// - internationalization +// - section and variable names can contain unicode letters, unicode digits +// (as defined in http://golang.org/ref/spec#Characters ) and hyphens +// (U+002D), starting with a unicode letter +// - disallow potentially ambiguous or misleading definitions: +// - `[sec.sub]` format is not allowed (deprecated in gitconfig) +// - `[sec ""]` is not allowed +// - use `[sec]` for section name "sec" and empty subsection name +// - (planned) within a single file, definitions must be contiguous for each: +// - section: '[secA]' -> '[secB]' -> '[secA]' is an error +// - subsection: '[sec "A"]' -> '[sec "B"]' -> '[sec "A"]' is an error +// - multivalued variable: 'multi=a' -> 'other=x' -> 'multi=b' is an error +// +// # Data structure // // The functions in this package read values into a user-defined struct. // Each section corresponds to a struct field in the config struct, and each @@ -56,7 +56,7 @@ // or when a field is not of a suitable type (either a struct or a map with // string keys and pointer-to-struct values). // -// Parsing of values +// # Parsing of values // // The section structs in the config struct may contain single-valued or // multi-valued variables. Variables of unnamed slice type (that is, a type @@ -98,17 +98,17 @@ // The types subpackage for provides helpers for parsing "enum-like" and integer // types. // -// Error handling +// # Error handling // // There are 3 types of errors: // -// - programmer errors / panics: -// - invalid configuration structure -// - data errors: -// - fatal errors: -// - invalid configuration syntax -// - warnings: -// - data that doesn't belong to any part of the config structure +// - programmer errors / panics: +// - invalid configuration structure +// - data errors: +// - fatal errors: +// - invalid configuration syntax +// - warnings: +// - data that doesn't belong to any part of the config structure // // Programmer errors trigger panics. These are should be fixed by the programmer // before releasing code that uses gcfg. @@ -122,24 +122,23 @@ // filtered out programmatically. To ignore extra data warnings, wrap the // gcfg.Read*Into invocation into a call to gcfg.FatalOnly. // -// TODO +// # TODO // // The following is a list of changes under consideration: -// - documentation -// - self-contained syntax documentation -// - more practical examples -// - move TODOs to issue tracker (eventually) -// - syntax -// - reconsider valid escape sequences -// (gitconfig doesn't support \r in value, \t in subsection name, etc.) -// - reading / parsing gcfg files -// - define internal representation structure -// - support multiple inputs (readers, strings, files) -// - support declaring encoding (?) -// - support varying fields sets for subsections (?) -// - writing gcfg files -// - error handling -// - make error context accessible programmatically? -// - limit input size? -// +// - documentation +// - self-contained syntax documentation +// - more practical examples +// - move TODOs to issue tracker (eventually) +// - syntax +// - reconsider valid escape sequences +// (gitconfig doesn't support \r in value, \t in subsection name, etc.) +// - reading / parsing gcfg files +// - define internal representation structure +// - support multiple inputs (readers, strings, files) +// - support declaring encoding (?) +// - support varying fields sets for subsections (?) +// - writing gcfg files +// - error handling +// - make error context accessible programmatically? +// - limit input size? package gcfg // import "github.com/go-git/gcfg" diff --git a/vendor/github.com/go-git/gcfg/errors.go b/vendor/github.com/go-git/gcfg/errors.go index 853c76021d..fe77046e16 100644 --- a/vendor/github.com/go-git/gcfg/errors.go +++ b/vendor/github.com/go-git/gcfg/errors.go @@ -8,10 +8,9 @@ import ( // fatal errors. That is, errors (warnings) indicating data for unknown // sections / variables is ignored. Example invocation: // -// err := gcfg.FatalOnly(gcfg.ReadFileInto(&cfg, configFile)) -// if err != nil { -// ... -// +// err := gcfg.FatalOnly(gcfg.ReadFileInto(&cfg, configFile)) +// if err != nil { +// ... func FatalOnly(err error) error { return warnings.FatalOnly(err) } diff --git a/vendor/github.com/go-git/gcfg/scanner/errors.go b/vendor/github.com/go-git/gcfg/scanner/errors.go index a6e00f5c64..3632df9984 100644 --- a/vendor/github.com/go-git/gcfg/scanner/errors.go +++ b/vendor/github.com/go-git/gcfg/scanner/errors.go @@ -18,7 +18,6 @@ import ( // The position Pos, if valid, points to the beginning of // the offending token, and the error condition is described // by Msg. -// type Error struct { Pos token.Position Msg string @@ -36,7 +35,6 @@ func (e Error) Error() string { // ErrorList is a list of *Errors. // The zero value for an ErrorList is an empty ErrorList ready to use. -// type ErrorList []*Error // Add adds an Error with given position and error message to an ErrorList. @@ -66,7 +64,6 @@ func (p ErrorList) Less(i, j int) bool { // Sort sorts an ErrorList. *Error entries are sorted by position, // other errors are sorted by error message, and before any *Error // entry. -// func (p ErrorList) Sort() { sort.Sort(p) } @@ -109,7 +106,6 @@ func (p ErrorList) Err() error { // PrintError is a utility function that prints a list of errors to w, // one error per line, if the err parameter is an ErrorList. Otherwise // it prints the err string. -// func PrintError(w io.Writer, err error) { if list, ok := err.(ErrorList); ok { for _, e := range list { diff --git a/vendor/github.com/go-git/gcfg/set.go b/vendor/github.com/go-git/gcfg/set.go index dc9795dbdb..8dc27e75eb 100644 --- a/vendor/github.com/go-git/gcfg/set.go +++ b/vendor/github.com/go-git/gcfg/set.go @@ -216,7 +216,7 @@ func newValue(c *warnings.Collector, sect string, vCfg reflect.Value, } func set(c *warnings.Collector, cfg interface{}, sect, sub, name string, - value string, blankValue bool, subsectPass bool) error { + value string, blankValue bool, subsectPass bool) error { // vPCfg := reflect.ValueOf(cfg) if vPCfg.Kind() != reflect.Ptr || vPCfg.Elem().Kind() != reflect.Struct { diff --git a/vendor/github.com/go-git/gcfg/token/position.go b/vendor/github.com/go-git/gcfg/token/position.go index fc45c1e769..a5ce7d2449 100644 --- a/vendor/github.com/go-git/gcfg/token/position.go +++ b/vendor/github.com/go-git/gcfg/token/position.go @@ -18,7 +18,6 @@ import ( // Position describes an arbitrary source position // including the file, line, and column location. // A Position is valid if the line number is > 0. -// type Position struct { Filename string // filename, if any Offset int // offset, starting at 0 @@ -35,7 +34,6 @@ func (pos *Position) IsValid() bool { return pos.Line > 0 } // line:column valid position without file name // file invalid position with file name // - invalid position without file name -// func (pos Position) String() string { s := pos.Filename if pos.IsValid() { @@ -69,14 +67,12 @@ func (pos Position) String() string { // equivalent to comparing the respective source file offsets. If p and q // are in different files, p < q is true if the file implied by p was added // to the respective file set before the file implied by q. -// type Pos int // The zero value for Pos is NoPos; there is no file and line information // associated with it, and NoPos().IsValid() is false. NoPos is always // smaller than any other Pos value. The corresponding Position value // for NoPos is the zero value for Position. -// const NoPos Pos = 0 // IsValid returns true if the position is valid. @@ -89,7 +85,6 @@ func (p Pos) IsValid() bool { // A File is a handle for a file belonging to a FileSet. // A File has a name, size, and line offset table. -// type File struct { set *FileSet name string // file name as provided to AddFile @@ -127,7 +122,6 @@ func (f *File) LineCount() int { // AddLine adds the line offset for a new line. // The line offset must be larger than the offset for the previous line // and smaller than the file size; otherwise the line offset is ignored. -// func (f *File) AddLine(offset int) { f.set.mutex.Lock() if i := len(f.lines); (i == 0 || f.lines[i-1] < offset) && offset < f.size { @@ -143,7 +137,6 @@ func (f *File) AddLine(offset int) { // Each line offset must be larger than the offset for the previous line // and smaller than the file size; otherwise SetLines fails and returns // false. -// func (f *File) SetLines(lines []int) bool { // verify validity of lines table size := f.size @@ -197,7 +190,6 @@ type lineInfo struct { // // AddLineInfo is typically used to register alternative position // information for //line filename:line comments in source files. -// func (f *File) AddLineInfo(offset int, filename string, line int) { f.set.mutex.Lock() if i := len(f.infos); i == 0 || f.infos[i-1].Offset < offset && offset < f.size { @@ -209,7 +201,6 @@ func (f *File) AddLineInfo(offset int, filename string, line int) { // Pos returns the Pos value for the given file offset; // the offset must be <= f.Size(). // f.Pos(f.Offset(p)) == p. -// func (f *File) Pos(offset int) Pos { if offset > f.size { panic("illegal file offset") @@ -220,7 +211,6 @@ func (f *File) Pos(offset int) Pos { // Offset returns the offset for the given file position p; // p must be a valid Pos value in that file. // f.Offset(f.Pos(offset)) == offset. -// func (f *File) Offset(p Pos) int { if int(p) < f.base || int(p) > f.base+f.size { panic("illegal Pos value") @@ -230,7 +220,6 @@ func (f *File) Offset(p Pos) int { // Line returns the line number for the given file position p; // p must be a Pos value in that file or NoPos. -// func (f *File) Line(p Pos) int { // TODO(gri) this can be implemented much more efficiently return f.Position(p).Line @@ -268,7 +257,6 @@ func (f *File) position(p Pos) (pos Position) { // Position returns the Position value for the given file position p; // p must be a Pos value in that file or NoPos. -// func (f *File) Position(p Pos) (pos Position) { if p != NoPos { if int(p) < f.base || int(p) > f.base+f.size { @@ -285,7 +273,6 @@ func (f *File) Position(p Pos) (pos Position) { // A FileSet represents a set of source files. // Methods of file sets are synchronized; multiple goroutines // may invoke them concurrently. -// type FileSet struct { mutex sync.RWMutex // protects the file set base int // base offset for the next file @@ -302,7 +289,6 @@ func NewFileSet() *FileSet { // Base returns the minimum base offset that must be provided to // AddFile when adding the next file. -// func (s *FileSet) Base() int { s.mutex.RLock() b := s.base @@ -325,7 +311,6 @@ func (s *FileSet) Base() int { // with offs in the range [0, size] and thus p in the range [base, base+size]. // For convenience, File.Pos may be used to create file-specific position // values from a file offset. -// func (s *FileSet) AddFile(filename string, base, size int) *File { s.mutex.Lock() defer s.mutex.Unlock() @@ -347,7 +332,6 @@ func (s *FileSet) AddFile(filename string, base, size int) *File { // Iterate calls f for the files in the file set in the order they were added // until f returns false. -// func (s *FileSet) Iterate(f func(*File) bool) { for i := 0; ; i++ { var file *File @@ -386,7 +370,6 @@ func (s *FileSet) file(p Pos) *File { // File returns the file that contains the position p. // If no such file is found (for instance for p == NoPos), // the result is nil. -// func (s *FileSet) File(p Pos) (f *File) { if p != NoPos { s.mutex.RLock() diff --git a/vendor/github.com/go-git/gcfg/token/token.go b/vendor/github.com/go-git/gcfg/token/token.go index b3c7c83fa9..102df388a7 100644 --- a/vendor/github.com/go-git/gcfg/token/token.go +++ b/vendor/github.com/go-git/gcfg/token/token.go @@ -7,7 +7,6 @@ // // Note that the API for the token package may change to accommodate new // features or implementation changes in gcfg. -// package token import "strconv" @@ -58,7 +57,6 @@ var tokens = [...]string{ // sequence (e.g., for the token ASSIGN, the string is "="). For all other // tokens the string corresponds to the token constant name (e.g. for the // token IDENT, the string is "IDENT"). -// func (tok Token) String() string { s := "" if 0 <= tok && tok < Token(len(tokens)) { @@ -74,10 +72,8 @@ func (tok Token) String() string { // IsLiteral returns true for tokens corresponding to identifiers // and basic type literals; it returns false otherwise. -// func (tok Token) IsLiteral() bool { return literal_beg < tok && tok < literal_end } // IsOperator returns true for tokens corresponding to operators and // delimiters; it returns false otherwise. -// func (tok Token) IsOperator() bool { return operator_beg < tok && tok < operator_end } diff --git a/vendor/github.com/go-git/go-billy/v5/fs.go b/vendor/github.com/go-git/go-billy/v5/fs.go index d86f9d8236..4d20b94855 100644 --- a/vendor/github.com/go-git/go-billy/v5/fs.go +++ b/vendor/github.com/go-git/go-billy/v5/fs.go @@ -164,7 +164,7 @@ type File interface { // Name returns the name of the file as presented to Open. Name() string io.Writer - // TODO: Add io.WriterAt for v6 + // TODO: Add io.WriterAt for v6 // io.WriterAt io.Reader io.ReaderAt diff --git a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/doc.go b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/doc.go index 3986c83658..6dad4296f8 100644 --- a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/doc.go +++ b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/doc.go @@ -1,122 +1,121 @@ // Package config implements encoding and decoding of git config files. // -// Configuration File -// ------------------ -// -// The Git configuration file contains a number of variables that affect -// the Git commands' behavior. The `.git/config` file in each repository -// is used to store the configuration for that repository, and -// `$HOME/.gitconfig` is used to store a per-user configuration as -// fallback values for the `.git/config` file. The file `/etc/gitconfig` -// can be used to store a system-wide default configuration. -// -// The configuration variables are used by both the Git plumbing -// and the porcelains. The variables are divided into sections, wherein -// the fully qualified variable name of the variable itself is the last -// dot-separated segment and the section name is everything before the last -// dot. The variable names are case-insensitive, allow only alphanumeric -// characters and `-`, and must start with an alphabetic character. Some -// variables may appear multiple times; we say then that the variable is -// multivalued. -// -// Syntax -// ~~~~~~ -// -// The syntax is fairly flexible and permissive; whitespaces are mostly -// ignored. The '#' and ';' characters begin comments to the end of line, -// blank lines are ignored. -// -// The file consists of sections and variables. A section begins with -// the name of the section in square brackets and continues until the next -// section begins. Section names are case-insensitive. Only alphanumeric -// characters, `-` and `.` are allowed in section names. Each variable -// must belong to some section, which means that there must be a section -// header before the first setting of a variable. -// -// Sections can be further divided into subsections. To begin a subsection -// put its name in double quotes, separated by space from the section name, -// in the section header, like in the example below: -// -// -------- -// [section "subsection"] -// -// -------- -// -// Subsection names are case sensitive and can contain any characters except -// newline (doublequote `"` and backslash can be included by escaping them -// as `\"` and `\\`, respectively). Section headers cannot span multiple -// lines. Variables may belong directly to a section or to a given subsection. -// You can have `[section]` if you have `[section "subsection"]`, but you -// don't need to. -// -// There is also a deprecated `[section.subsection]` syntax. With this -// syntax, the subsection name is converted to lower-case and is also -// compared case sensitively. These subsection names follow the same -// restrictions as section names. -// -// All the other lines (and the remainder of the line after the section -// header) are recognized as setting variables, in the form -// 'name = value' (or just 'name', which is a short-hand to say that -// the variable is the boolean "true"). -// The variable names are case-insensitive, allow only alphanumeric characters -// and `-`, and must start with an alphabetic character. -// -// A line that defines a value can be continued to the next line by -// ending it with a `\`; the backquote and the end-of-line are -// stripped. Leading whitespaces after 'name =', the remainder of the -// line after the first comment character '#' or ';', and trailing -// whitespaces of the line are discarded unless they are enclosed in -// double quotes. Internal whitespaces within the value are retained -// verbatim. -// -// Inside double quotes, double quote `"` and backslash `\` characters -// must be escaped: use `\"` for `"` and `\\` for `\`. -// -// The following escape sequences (beside `\"` and `\\`) are recognized: -// `\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB) -// and `\b` for backspace (BS). Other char escape sequences (including octal -// escape sequences) are invalid. -// -// Includes -// ~~~~~~~~ -// -// You can include one config file from another by setting the special -// `include.path` variable to the name of the file to be included. The -// variable takes a pathname as its value, and is subject to tilde -// expansion. -// -// The included file is expanded immediately, as if its contents had been -// found at the location of the include directive. If the value of the -// `include.path` variable is a relative path, the path is considered to be -// relative to the configuration file in which the include directive was -// found. See below for examples. -// -// -// Example -// ~~~~~~~ -// -// # Core variables -// [core] -// ; Don't trust file modes -// filemode = false -// -// # Our diff algorithm -// [diff] -// external = /usr/local/bin/diff-wrapper -// renames = true -// -// [branch "devel"] -// remote = origin -// merge = refs/heads/devel -// -// # Proxy settings -// [core] -// gitProxy="ssh" for "kernel.org" -// gitProxy=default-proxy ; for the rest -// -// [include] -// path = /path/to/foo.inc ; include by absolute path -// path = foo ; expand "foo" relative to the current file -// path = ~/foo ; expand "foo" in your `$HOME` directory -// +// Configuration File +// ------------------ +// +// The Git configuration file contains a number of variables that affect +// the Git commands' behavior. The `.git/config` file in each repository +// is used to store the configuration for that repository, and +// `$HOME/.gitconfig` is used to store a per-user configuration as +// fallback values for the `.git/config` file. The file `/etc/gitconfig` +// can be used to store a system-wide default configuration. +// +// The configuration variables are used by both the Git plumbing +// and the porcelains. The variables are divided into sections, wherein +// the fully qualified variable name of the variable itself is the last +// dot-separated segment and the section name is everything before the last +// dot. The variable names are case-insensitive, allow only alphanumeric +// characters and `-`, and must start with an alphabetic character. Some +// variables may appear multiple times; we say then that the variable is +// multivalued. +// +// Syntax +// ~~~~~~ +// +// The syntax is fairly flexible and permissive; whitespaces are mostly +// ignored. The '#' and ';' characters begin comments to the end of line, +// blank lines are ignored. +// +// The file consists of sections and variables. A section begins with +// the name of the section in square brackets and continues until the next +// section begins. Section names are case-insensitive. Only alphanumeric +// characters, `-` and `.` are allowed in section names. Each variable +// must belong to some section, which means that there must be a section +// header before the first setting of a variable. +// +// Sections can be further divided into subsections. To begin a subsection +// put its name in double quotes, separated by space from the section name, +// in the section header, like in the example below: +// +// -------- +// [section "subsection"] +// +// -------- +// +// Subsection names are case sensitive and can contain any characters except +// newline (doublequote `"` and backslash can be included by escaping them +// as `\"` and `\\`, respectively). Section headers cannot span multiple +// lines. Variables may belong directly to a section or to a given subsection. +// You can have `[section]` if you have `[section "subsection"]`, but you +// don't need to. +// +// There is also a deprecated `[section.subsection]` syntax. With this +// syntax, the subsection name is converted to lower-case and is also +// compared case sensitively. These subsection names follow the same +// restrictions as section names. +// +// All the other lines (and the remainder of the line after the section +// header) are recognized as setting variables, in the form +// 'name = value' (or just 'name', which is a short-hand to say that +// the variable is the boolean "true"). +// The variable names are case-insensitive, allow only alphanumeric characters +// and `-`, and must start with an alphabetic character. +// +// A line that defines a value can be continued to the next line by +// ending it with a `\`; the backquote and the end-of-line are +// stripped. Leading whitespaces after 'name =', the remainder of the +// line after the first comment character '#' or ';', and trailing +// whitespaces of the line are discarded unless they are enclosed in +// double quotes. Internal whitespaces within the value are retained +// verbatim. +// +// Inside double quotes, double quote `"` and backslash `\` characters +// must be escaped: use `\"` for `"` and `\\` for `\`. +// +// The following escape sequences (beside `\"` and `\\`) are recognized: +// `\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB) +// and `\b` for backspace (BS). Other char escape sequences (including octal +// escape sequences) are invalid. +// +// Includes +// ~~~~~~~~ +// +// You can include one config file from another by setting the special +// `include.path` variable to the name of the file to be included. The +// variable takes a pathname as its value, and is subject to tilde +// expansion. +// +// The included file is expanded immediately, as if its contents had been +// found at the location of the include directive. If the value of the +// `include.path` variable is a relative path, the path is considered to be +// relative to the configuration file in which the include directive was +// found. See below for examples. +// +// +// Example +// ~~~~~~~ +// +// # Core variables +// [core] +// ; Don't trust file modes +// filemode = false +// +// # Our diff algorithm +// [diff] +// external = /usr/local/bin/diff-wrapper +// renames = true +// +// [branch "devel"] +// remote = origin +// merge = refs/heads/devel +// +// # Proxy settings +// [core] +// gitProxy="ssh" for "kernel.org" +// gitProxy=default-proxy ; for the rest +// +// [include] +// path = /path/to/foo.inc ; include by absolute path +// path = foo ; expand "foo" relative to the current file +// path = ~/foo ; expand "foo" in your `$HOME` directory package config diff --git a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/encoder.go b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/encoder.go index de069aed5e..4620dc0a54 100644 --- a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/encoder.go +++ b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/encoder.go @@ -13,8 +13,9 @@ type Encoder struct { var ( subsectionReplacer = strings.NewReplacer(`"`, `\"`, `\`, `\\`) - valueReplacer = strings.NewReplacer(`"`, `\"`, `\`, `\\`, "\n", `\n`, "\t", `\t`, "\b", `\b`) + valueReplacer = strings.NewReplacer(`"`, `\"`, `\`, `\\`, "\n", `\n`, "\t", `\t`, "\b", `\b`) ) + // NewEncoder returns a new encoder that writes to w. func NewEncoder(w io.Writer) *Encoder { return &Encoder{w} @@ -63,7 +64,7 @@ func (e *Encoder) encodeOptions(opts Options) error { for _, o := range opts { var value string if strings.ContainsAny(o.Value, "#;\"\t\n\\") || strings.HasPrefix(o.Value, " ") || strings.HasSuffix(o.Value, " ") { - value = `"`+valueReplacer.Replace(o.Value)+`"` + value = `"` + valueReplacer.Replace(o.Value) + `"` } else { value = o.Value } diff --git a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/option.go b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/option.go index cad394810a..1e4bd77a7b 100644 --- a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/option.go +++ b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/option.go @@ -34,7 +34,7 @@ func (opts Options) GoString() string { // Get gets the value for the given key if set, // otherwise it returns the empty string. // -// Note that there is no difference +// # Note that there is no difference // // This matches git behaviour since git v1.8.1-rc1, // if there are multiple definitions of a key, the diff --git a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/section.go b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/section.go index 4625ac5837..1f98813d2f 100644 --- a/vendor/github.com/go-git/go-git/v5/plumbing/format/config/section.go +++ b/vendor/github.com/go-git/go-git/v5/plumbing/format/config/section.go @@ -12,7 +12,7 @@ import ( // put its name in double quotes, separated by space from the section name, // in the section header, like in the example below: // -// [section "subsection"] +// [section "subsection"] // // All the other lines (and the remainder of the line after the section header) // are recognized as option variables, in the form "name = value" (or just name, @@ -20,12 +20,11 @@ import ( // The variable names are case-insensitive, allow only alphanumeric characters // and -, and must start with an alphabetic character: // -// [section "subsection1"] -// option1 = value1 -// option2 -// [section "subsection2"] -// option3 = value2 -// +// [section "subsection1"] +// option1 = value1 +// option2 +// [section "subsection2"] +// option3 = value2 type Section struct { Name string Options Options diff --git a/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/doc.go b/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/doc.go index eecd4baccb..24d702a507 100644 --- a/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/doc.go +++ b/vendor/github.com/go-git/go-git/v5/plumbing/format/gitignore/doc.go @@ -3,68 +3,68 @@ // priorities. It support all pattern formats as specified in the original gitignore // documentation, copied below: // -// Pattern format -// ============== +// Pattern format +// ============== // -// - A blank line matches no files, so it can serve as a separator for readability. +// - A blank line matches no files, so it can serve as a separator for readability. // -// - A line starting with # serves as a comment. Put a backslash ("\") in front of -// the first hash for patterns that begin with a hash. +// - A line starting with # serves as a comment. Put a backslash ("\") in front of +// the first hash for patterns that begin with a hash. // -// - Trailing spaces are ignored unless they are quoted with backslash ("\"). +// - Trailing spaces are ignored unless they are quoted with backslash ("\"). // -// - An optional prefix "!" which negates the pattern; any matching file excluded -// by a previous pattern will become included again. It is not possible to -// re-include a file if a parent directory of that file is excluded. -// Git doesn’t list excluded directories for performance reasons, so -// any patterns on contained files have no effect, no matter where they are -// defined. Put a backslash ("\") in front of the first "!" for patterns -// that begin with a literal "!", for example, "\!important!.txt". +// - An optional prefix "!" which negates the pattern; any matching file excluded +// by a previous pattern will become included again. It is not possible to +// re-include a file if a parent directory of that file is excluded. +// Git doesn’t list excluded directories for performance reasons, so +// any patterns on contained files have no effect, no matter where they are +// defined. Put a backslash ("\") in front of the first "!" for patterns +// that begin with a literal "!", for example, "\!important!.txt". // -// - If the pattern ends with a slash, it is removed for the purpose of the -// following description, but it would only find a match with a directory. -// In other words, foo/ will match a directory foo and paths underneath it, -// but will not match a regular file or a symbolic link foo (this is consistent -// with the way how pathspec works in general in Git). +// - If the pattern ends with a slash, it is removed for the purpose of the +// following description, but it would only find a match with a directory. +// In other words, foo/ will match a directory foo and paths underneath it, +// but will not match a regular file or a symbolic link foo (this is consistent +// with the way how pathspec works in general in Git). // -// - If the pattern does not contain a slash /, Git treats it as a shell glob -// pattern and checks for a match against the pathname relative to the location -// of the .gitignore file (relative to the toplevel of the work tree if not -// from a .gitignore file). +// - If the pattern does not contain a slash /, Git treats it as a shell glob +// pattern and checks for a match against the pathname relative to the location +// of the .gitignore file (relative to the toplevel of the work tree if not +// from a .gitignore file). // -// - Otherwise, Git treats the pattern as a shell glob suitable for consumption -// by fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will -// not match a / in the pathname. For example, "Documentation/*.html" matches -// "Documentation/git.html" but not "Documentation/ppc/ppc.html" or -// "tools/perf/Documentation/perf.html". +// - Otherwise, Git treats the pattern as a shell glob suitable for consumption +// by fnmatch(3) with the FNM_PATHNAME flag: wildcards in the pattern will +// not match a / in the pathname. For example, "Documentation/*.html" matches +// "Documentation/git.html" but not "Documentation/ppc/ppc.html" or +// "tools/perf/Documentation/perf.html". // -// - A leading slash matches the beginning of the pathname. For example, -// "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". +// - A leading slash matches the beginning of the pathname. For example, +// "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". // -// Two consecutive asterisks ("**") in patterns matched against full pathname -// may have special meaning: +// Two consecutive asterisks ("**") in patterns matched against full pathname +// may have special meaning: // -// - A leading "**" followed by a slash means match in all directories. -// For example, "**/foo" matches file or directory "foo" anywhere, the same as -// pattern "foo". "**/foo/bar" matches file or directory "bar" -// anywhere that is directly under directory "foo". +// - A leading "**" followed by a slash means match in all directories. +// For example, "**/foo" matches file or directory "foo" anywhere, the same as +// pattern "foo". "**/foo/bar" matches file or directory "bar" +// anywhere that is directly under directory "foo". // -// - A trailing "/**" matches everything inside. For example, "abc/**" matches -// all files inside directory "abc", relative to the location of the -// .gitignore file, with infinite depth. +// - A trailing "/**" matches everything inside. For example, "abc/**" matches +// all files inside directory "abc", relative to the location of the +// .gitignore file, with infinite depth. // -// - A slash followed by two consecutive asterisks then a slash matches -// zero or more directories. For example, "a/**/b" matches "a/b", "a/x/b", -// "a/x/y/b" and so on. +// - A slash followed by two consecutive asterisks then a slash matches +// zero or more directories. For example, "a/**/b" matches "a/b", "a/x/b", +// "a/x/y/b" and so on. // -// - Other consecutive asterisks are considered invalid. +// - Other consecutive asterisks are considered invalid. // -// Copyright and license -// ===================== +// Copyright and license +// ===================== // -// Copyright (c) Oleg Sklyar, Silvertern and source{d} +// Copyright (c) Oleg Sklyar, Silvertern and source{d} // -// The package code was donated to source{d} to include, modify and develop -// further as a part of the `go-git` project, release it on the license of -// the whole project or delete it from the project. +// The package code was donated to source{d} to include, modify and develop +// further as a part of the `go-git` project, release it on the license of +// the whole project or delete it from the project. package gitignore diff --git a/vendor/github.com/go-task/slim-sprig/v3/functions.go b/vendor/github.com/go-task/slim-sprig/v3/functions.go index 5ea74f8993..32a3b07462 100644 --- a/vendor/github.com/go-task/slim-sprig/v3/functions.go +++ b/vendor/github.com/go-task/slim-sprig/v3/functions.go @@ -18,8 +18,7 @@ import ( // // Use this to pass the functions into the template engine: // -// tpl := template.New("foo").Funcs(sprig.FuncMap())) -// +// tpl := template.New("foo").Funcs(sprig.FuncMap())) func FuncMap() template.FuncMap { return HtmlFuncMap() } diff --git a/vendor/github.com/gobuffalo/flect/camelize.go b/vendor/github.com/gobuffalo/flect/camelize.go index d8851c8f5e..2e0be98ac6 100644 --- a/vendor/github.com/gobuffalo/flect/camelize.go +++ b/vendor/github.com/gobuffalo/flect/camelize.go @@ -6,6 +6,7 @@ import ( ) // Camelize returns a camelize version of a string +// // bob dylan = bobDylan // widget_id = widgetID // WidgetID = widgetID @@ -14,6 +15,7 @@ func Camelize(s string) string { } // Camelize returns a camelize version of a string +// // bob dylan = bobDylan // widget_id = widgetID // WidgetID = widgetID diff --git a/vendor/github.com/gobuffalo/flect/capitalize.go b/vendor/github.com/gobuffalo/flect/capitalize.go index 78334fc0f9..7a6d683b3a 100644 --- a/vendor/github.com/gobuffalo/flect/capitalize.go +++ b/vendor/github.com/gobuffalo/flect/capitalize.go @@ -3,6 +3,7 @@ package flect import "unicode" // Capitalize will cap the first letter of string +// // user = User // bob dylan = Bob dylan // widget_id = Widget_id @@ -11,6 +12,7 @@ func Capitalize(s string) string { } // Capitalize will cap the first letter of string +// // user = User // bob dylan = Bob dylan // widget_id = Widget_id diff --git a/vendor/github.com/gobuffalo/flect/custom_data.go b/vendor/github.com/gobuffalo/flect/custom_data.go index efb445f671..716419b809 100644 --- a/vendor/github.com/gobuffalo/flect/custom_data.go +++ b/vendor/github.com/gobuffalo/flect/custom_data.go @@ -16,8 +16,8 @@ func init() { loadCustomData("acronyms.json", "ACRONYMS_PATH", "could not read acronyms file", LoadAcronyms) } -//CustomDataParser are functions that parse data like acronyms or -//plurals in the shape of a io.Reader it receives. +// CustomDataParser are functions that parse data like acronyms or +// plurals in the shape of a io.Reader it receives. type CustomDataParser func(io.Reader) error func loadCustomData(defaultFile, env, readErrorMessage string, parser CustomDataParser) { @@ -42,7 +42,7 @@ func loadCustomData(defaultFile, env, readErrorMessage string, parser CustomData } } -//LoadAcronyms loads rules from io.Reader param +// LoadAcronyms loads rules from io.Reader param func LoadAcronyms(r io.Reader) error { m := []string{} err := json.NewDecoder(r).Decode(&m) @@ -61,7 +61,7 @@ func LoadAcronyms(r io.Reader) error { return nil } -//LoadInflections loads rules from io.Reader param +// LoadInflections loads rules from io.Reader param func LoadInflections(r io.Reader) error { m := map[string]string{} diff --git a/vendor/github.com/gobuffalo/flect/dasherize.go b/vendor/github.com/gobuffalo/flect/dasherize.go index c7a8a33e36..2f27a34b40 100644 --- a/vendor/github.com/gobuffalo/flect/dasherize.go +++ b/vendor/github.com/gobuffalo/flect/dasherize.go @@ -6,6 +6,7 @@ import ( ) // Dasherize returns an alphanumeric, lowercased, dashed string +// // Donald E. Knuth = donald-e-knuth // Test with + sign = test-with-sign // admin/WidgetID = admin-widget-id @@ -14,6 +15,7 @@ func Dasherize(s string) string { } // Dasherize returns an alphanumeric, lowercased, dashed string +// // Donald E. Knuth = donald-e-knuth // Test with + sign = test-with-sign // admin/WidgetID = admin-widget-id diff --git a/vendor/github.com/gobuffalo/flect/ident.go b/vendor/github.com/gobuffalo/flect/ident.go index 9189e9a39b..16fa07e582 100644 --- a/vendor/github.com/gobuffalo/flect/ident.go +++ b/vendor/github.com/gobuffalo/flect/ident.go @@ -110,13 +110,13 @@ func (i Ident) ReplaceSuffix(orig, new string) Ident { return New(strings.TrimSuffix(i.Original, orig) + new) } -//UnmarshalText unmarshalls byte array into the Ident +// UnmarshalText unmarshalls byte array into the Ident func (i *Ident) UnmarshalText(data []byte) error { (*i) = New(string(data)) return nil } -//MarshalText marshals Ident into byte array +// MarshalText marshals Ident into byte array func (i Ident) MarshalText() ([]byte, error) { return []byte(i.Original), nil } diff --git a/vendor/github.com/gobuffalo/flect/ordinalize.go b/vendor/github.com/gobuffalo/flect/ordinalize.go index 1ce27b3a0d..fb45d1119c 100644 --- a/vendor/github.com/gobuffalo/flect/ordinalize.go +++ b/vendor/github.com/gobuffalo/flect/ordinalize.go @@ -6,6 +6,7 @@ import ( ) // Ordinalize converts a number to an ordinal version +// // 42 = 42nd // 45 = 45th // 1 = 1st @@ -14,6 +15,7 @@ func Ordinalize(s string) string { } // Ordinalize converts a number to an ordinal version +// // 42 = 42nd // 45 = 45th // 1 = 1st diff --git a/vendor/github.com/gobuffalo/flect/pascalize.go b/vendor/github.com/gobuffalo/flect/pascalize.go index 6396d0d4e7..40db178f58 100644 --- a/vendor/github.com/gobuffalo/flect/pascalize.go +++ b/vendor/github.com/gobuffalo/flect/pascalize.go @@ -5,6 +5,7 @@ import ( ) // Pascalize returns a string with each segment capitalized +// // user = User // bob dylan = BobDylan // widget_id = WidgetID @@ -13,6 +14,7 @@ func Pascalize(s string) string { } // Pascalize returns a string with each segment capitalized +// // user = User // bob dylan = BobDylan // widget_id = WidgetID diff --git a/vendor/github.com/gobuffalo/flect/pluralize.go b/vendor/github.com/gobuffalo/flect/pluralize.go index d0ac77d3fc..c1f7477a1b 100644 --- a/vendor/github.com/gobuffalo/flect/pluralize.go +++ b/vendor/github.com/gobuffalo/flect/pluralize.go @@ -8,6 +8,7 @@ import ( var pluralMoot = &sync.RWMutex{} // Pluralize returns a plural version of the string +// // user = users // person = people // datum = data @@ -16,6 +17,7 @@ func Pluralize(s string) string { } // PluralizeWithSize will pluralize a string taking a number number into account. +// // PluralizeWithSize("user", 1) = user // PluralizeWithSize("user", 2) = users func PluralizeWithSize(s string, i int) string { @@ -26,6 +28,7 @@ func PluralizeWithSize(s string, i int) string { } // Pluralize returns a plural version of the string +// // user = users // person = people // datum = data diff --git a/vendor/github.com/gobuffalo/flect/singularize.go b/vendor/github.com/gobuffalo/flect/singularize.go index d00cf4f1e4..b9ca2aca90 100644 --- a/vendor/github.com/gobuffalo/flect/singularize.go +++ b/vendor/github.com/gobuffalo/flect/singularize.go @@ -8,6 +8,7 @@ import ( var singularMoot = &sync.RWMutex{} // Singularize returns a singular version of the string +// // users = user // data = datum // people = person @@ -16,6 +17,7 @@ func Singularize(s string) string { } // SingularizeWithSize will singular a string taking a number number into account. +// // SingularizeWithSize("user", 1) = user // SingularizeWithSize("user", 2) = users func SingularizeWithSize(s string, i int) string { @@ -23,6 +25,7 @@ func SingularizeWithSize(s string, i int) string { } // Singularize returns a singular version of the string +// // users = user // data = datum // people = person diff --git a/vendor/github.com/gobuffalo/flect/titleize.go b/vendor/github.com/gobuffalo/flect/titleize.go index 0878ada8de..d51dcc3b33 100644 --- a/vendor/github.com/gobuffalo/flect/titleize.go +++ b/vendor/github.com/gobuffalo/flect/titleize.go @@ -6,6 +6,7 @@ import ( ) // Titleize will capitalize the start of each part +// // "Nice to see you!" = "Nice To See You!" // "i've read a book! have you?" = "I've Read A Book! Have You?" // "This is `code` ok" = "This Is `code` OK" @@ -14,6 +15,7 @@ func Titleize(s string) string { } // Titleize will capitalize the start of each part +// // "Nice to see you!" = "Nice To See You!" // "i've read a book! have you?" = "I've Read A Book! Have You?" // "This is `code` ok" = "This Is `code` OK" diff --git a/vendor/github.com/gobuffalo/flect/underscore.go b/vendor/github.com/gobuffalo/flect/underscore.go index d42859a59a..6521766380 100644 --- a/vendor/github.com/gobuffalo/flect/underscore.go +++ b/vendor/github.com/gobuffalo/flect/underscore.go @@ -6,6 +6,7 @@ import ( ) // Underscore a string +// // bob dylan --> bob_dylan // Nice to see you! --> nice_to_see_you // widgetID --> widget_id @@ -14,6 +15,7 @@ func Underscore(s string) string { } // Underscore a string +// // bob dylan --> bob_dylan // Nice to see you! --> nice_to_see_you // widgetID --> widget_id diff --git a/vendor/github.com/gobuffalo/flect/version.go b/vendor/github.com/gobuffalo/flect/version.go index 79486ed2c2..5dad993951 100644 --- a/vendor/github.com/gobuffalo/flect/version.go +++ b/vendor/github.com/gobuffalo/flect/version.go @@ -1,4 +1,4 @@ package flect -//Version holds Flect version number +// Version holds Flect version number const Version = "v1.0.0" diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go index 081c86fa8e..40f4b7ae37 100644 --- a/vendor/github.com/gogo/protobuf/gogoproto/doc.go +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -35,7 +35,7 @@ Package gogoproto provides extensions for protocol buffers to achieve: - less typing by optionally generating extra helper code. - goprotobuf compatibility -More Canonical Go Structures +# More Canonical Go Structures A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. @@ -59,15 +59,15 @@ for a quicker overview. The following message: - package test; + package test; - import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } Will generate a go struct which looks a lot like this: @@ -120,12 +120,12 @@ This is typically useful when working with a protocol buffer that was designed b Gogoprotobuf also has some more subtle changes, these could be changed back: - the generated package name for imports do not have the extra /filename.pb, - but are actually the imports specified in the .proto file. + but are actually the imports specified in the .proto file. Gogoprotobuf also has lost some features which should be brought back with time: - Marshalling and unmarshalling with reflect and without the unsafe package, - this requires work in pointer_reflect.go + this requires work in pointer_reflect.go Why does nullable break protocol buffer specifications: @@ -152,7 +152,7 @@ The enumprefix, getters and stringer extensions can be used to remove some of th Less Typing and Peace of Mind is explained in their specific plugin folders godoc: - - github.com/gogo/protobuf/plugin/ + - github.com/gogo/protobuf/plugin/ If you do not use any of these extension the code that is generated will be the same as if goprotobuf has generated it. @@ -164,6 +164,5 @@ The most complete way to see examples is to look at Gogoprototest is a seperate project, because we want to keep gogoprotobuf independent of goprotobuf, but we still want to test it thoroughly. - */ package gogoproto diff --git a/vendor/github.com/gogo/protobuf/proto/lib.go b/vendor/github.com/gogo/protobuf/proto/lib.go index 80db1c155b..10eec0d0ee 100644 --- a/vendor/github.com/gogo/protobuf/proto/lib.go +++ b/vendor/github.com/gogo/protobuf/proto/lib.go @@ -39,35 +39,35 @@ for a protocol buffer variable v: - Names are turned from camel_case to CamelCase for export. - There are no methods on v to set fields; just treat - them as structure fields. + them as structure fields. - There are getters that return a field's value if set, - and return the field's default value if unset. - The getters work even if the receiver is a nil message. + and return the field's default value if unset. + The getters work even if the receiver is a nil message. - The zero value for a struct is its correct initialization state. - All desired fields must be set before marshaling. + All desired fields must be set before marshaling. - A Reset() method will restore a protobuf struct to its zero state. - Non-repeated fields are pointers to the values; nil means unset. - That is, optional or required field int32 f becomes F *int32. + That is, optional or required field int32 f becomes F *int32. - Repeated fields are slices. - Helper functions are available to aid the setting of fields. - msg.Foo = proto.String("hello") // set field + msg.Foo = proto.String("hello") // set field - Constants are defined to hold the default values of all fields that - have them. They have the form Default_StructName_FieldName. - Because the getter methods handle defaulted values, - direct use of these constants should be rare. + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. - Enums are given type names and maps from names to values. - Enum values are prefixed by the enclosing message's name, or by the - enum's type name if it is a top-level enum. Enum types have a String - method, and a Enum method to assist in message construction. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. - Nested messages, groups and enums have type names prefixed with the name of - the surrounding message type. + the surrounding message type. - Extensions are given descriptor names that start with E_, - followed by an underscore-delimited list of the nested messages - that contain it (if any) followed by the CamelCased name of the - extension field itself. HasExtension, ClearExtension, GetExtension - and SetExtension are functions for manipulating extensions. + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. - Oneof field sets are given a single field in their message, - with distinguished wrapper types for each possible field value. + with distinguished wrapper types for each possible field value. - Marshal and Unmarshal are functions to encode and decode the wire format. When the .proto file specifies `syntax="proto3"`, there are some differences: diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go index b6cad90834..461d58218a 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect.go @@ -29,6 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build purego || appengine || js // +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go index 7ffd3c29d9..d6e07e2f71 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_reflect_gogo.go @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build purego || appengine || js // +build purego appengine js // This file contains an implementation of proto field accesses using package reflect. diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go index d55a335d94..c998399ba7 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe.go @@ -29,6 +29,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build !purego && !appengine && !js // +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. diff --git a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go index aca8eed02a..57a1496565 100644 --- a/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go +++ b/vendor/github.com/gogo/protobuf/proto/pointer_unsafe_gogo.go @@ -26,6 +26,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +//go:build !purego && !appengine && !js // +build !purego,!appengine,!js // This file contains the implementation of the proto field accesses using package unsafe. diff --git a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go index 937229386a..7c3e9e000e 100644 --- a/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go +++ b/vendor/github.com/gogo/protobuf/proto/table_unmarshal.go @@ -2004,12 +2004,14 @@ func makeUnmarshalMap(f *reflect.StructField) unmarshaler { // makeUnmarshalOneof makes an unmarshaler for oneof fields. // for: -// message Msg { -// oneof F { -// int64 X = 1; -// float64 Y = 2; -// } -// } +// +// message Msg { +// oneof F { +// int64 X = 1; +// float64 Y = 2; +// } +// } +// // typ is the type of the concrete entry for a oneof case (e.g. Msg_X). // ityp is the interface type of the oneof field (e.g. isMsg_F). // unmarshal is the unmarshaler for the base type of the oneof case (e.g. int64). diff --git a/vendor/github.com/golang/mock/CONTRIBUTORS b/vendor/github.com/golang/mock/CONTRIBUTORS deleted file mode 100644 index def849cab1..0000000000 --- a/vendor/github.com/golang/mock/CONTRIBUTORS +++ /dev/null @@ -1,37 +0,0 @@ -# This is the official list of people who can contribute (and typically -# have contributed) code to the gomock repository. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# The submission process automatically checks to make sure -# that people submitting code are listed in this file (by email address). -# -# Names should be added to this file only after verifying that -# the individual or the individual's organization has agreed to -# the appropriate Contributor License Agreement, found here: -# -# http://code.google.com/legal/individual-cla-v1.0.html -# http://code.google.com/legal/corporate-cla-v1.0.html -# -# The agreement for individuals can be filled out on the web. -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file, depending on whether the -# individual or corporate CLA was used. - -# Names should be added to this file like so: -# Name -# -# An entry with two email addresses specifies that the -# first address should be used in the submit logs and -# that the second address should be recognized as the -# same person when interacting with Rietveld. - -# Please keep the list sorted. - -Aaron Jacobs -Alex Reece -David Symonds -Ryan Barrett diff --git a/vendor/github.com/golang/mock/mockgen/reflect.go b/vendor/github.com/golang/mock/mockgen/reflect.go deleted file mode 100644 index e24efce0ba..0000000000 --- a/vendor/github.com/golang/mock/mockgen/reflect.go +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright 2012 Google Inc. -// -// 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 main - -// This file contains the model construction by reflection. - -import ( - "bytes" - "encoding/gob" - "flag" - "fmt" - "go/build" - "io" - "io/ioutil" - "log" - "os" - "os/exec" - "path/filepath" - "runtime" - "strings" - "text/template" - - "github.com/golang/mock/mockgen/model" -) - -var ( - progOnly = flag.Bool("prog_only", false, "(reflect mode) Only generate the reflection program; write it to stdout and exit.") - execOnly = flag.String("exec_only", "", "(reflect mode) If set, execute this reflection program.") - buildFlags = flag.String("build_flags", "", "(reflect mode) Additional flags for go build.") -) - -// reflectMode generates mocks via reflection on an interface. -func reflectMode(importPath string, symbols []string) (*model.Package, error) { - if *execOnly != "" { - return run(*execOnly) - } - - program, err := writeProgram(importPath, symbols) - if err != nil { - return nil, err - } - - if *progOnly { - if _, err := os.Stdout.Write(program); err != nil { - return nil, err - } - os.Exit(0) - } - - wd, _ := os.Getwd() - - // Try to run the reflection program in the current working directory. - if p, err := runInDir(program, wd); err == nil { - return p, nil - } - - // Try to run the program in the same directory as the input package. - if p, err := build.Import(importPath, wd, build.FindOnly); err == nil { - dir := p.Dir - if p, err := runInDir(program, dir); err == nil { - return p, nil - } - } - - // Try to run it in a standard temp directory. - return runInDir(program, "") -} - -func writeProgram(importPath string, symbols []string) ([]byte, error) { - var program bytes.Buffer - data := reflectData{ - ImportPath: importPath, - Symbols: symbols, - } - if err := reflectProgram.Execute(&program, &data); err != nil { - return nil, err - } - return program.Bytes(), nil -} - -// run the given program and parse the output as a model.Package. -func run(program string) (*model.Package, error) { - f, err := ioutil.TempFile("", "") - if err != nil { - return nil, err - } - - filename := f.Name() - defer os.Remove(filename) - if err := f.Close(); err != nil { - return nil, err - } - - // Run the program. - cmd := exec.Command(program, "-output", filename) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - return nil, err - } - - f, err = os.Open(filename) - if err != nil { - return nil, err - } - - // Process output. - var pkg model.Package - if err := gob.NewDecoder(f).Decode(&pkg); err != nil { - return nil, err - } - - if err := f.Close(); err != nil { - return nil, err - } - - return &pkg, nil -} - -// runInDir writes the given program into the given dir, runs it there, and -// parses the output as a model.Package. -func runInDir(program []byte, dir string) (*model.Package, error) { - // We use TempDir instead of TempFile so we can control the filename. - tmpDir, err := ioutil.TempDir(dir, "gomock_reflect_") - if err != nil { - return nil, err - } - defer func() { - if err := os.RemoveAll(tmpDir); err != nil { - log.Printf("failed to remove temp directory: %s", err) - } - }() - const progSource = "prog.go" - var progBinary = "prog.bin" - if runtime.GOOS == "windows" { - // Windows won't execute a program unless it has a ".exe" suffix. - progBinary += ".exe" - } - - if err := ioutil.WriteFile(filepath.Join(tmpDir, progSource), program, 0600); err != nil { - return nil, err - } - - cmdArgs := []string{} - cmdArgs = append(cmdArgs, "build") - if *buildFlags != "" { - cmdArgs = append(cmdArgs, strings.Split(*buildFlags, " ")...) - } - cmdArgs = append(cmdArgs, "-o", progBinary, progSource) - - // Build the program. - buf := bytes.NewBuffer(nil) - cmd := exec.Command("go", cmdArgs...) - cmd.Dir = tmpDir - cmd.Stdout = os.Stdout - cmd.Stderr = io.MultiWriter(os.Stderr, buf) - 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.") - return nil, err - } - return nil, err - } - - return run(filepath.Join(tmpDir, progBinary)) -} - -type reflectData struct { - ImportPath string - Symbols []string -} - -// This program reflects on an interface value, and prints the -// gob encoding of a model.Package to standard output. -// JSON doesn't work because of the model.Type interface. -var reflectProgram = template.Must(template.New("program").Parse(` -package main - -import ( - "encoding/gob" - "flag" - "fmt" - "os" - "path" - "reflect" - - "github.com/golang/mock/mockgen/model" - - pkg_ {{printf "%q" .ImportPath}} -) - -var output = flag.String("output", "", "The output file name, or empty to use stdout.") - -func main() { - flag.Parse() - - its := []struct{ - sym string - typ reflect.Type - }{ - {{range .Symbols}} - { {{printf "%q" .}}, reflect.TypeOf((*pkg_.{{.}})(nil)).Elem()}, - {{end}} - } - pkg := &model.Package{ - // NOTE: This behaves contrary to documented behaviour if the - // package name is not the final component of the import path. - // The reflect package doesn't expose the package name, though. - Name: path.Base({{printf "%q" .ImportPath}}), - } - - for _, it := range its { - intf, err := model.InterfaceFromInterfaceType(it.typ) - if err != nil { - fmt.Fprintf(os.Stderr, "Reflection: %v\n", err) - os.Exit(1) - } - intf.Name = it.sym - pkg.Interfaces = append(pkg.Interfaces, intf) - } - - outfile := os.Stdout - if len(*output) != 0 { - var err error - outfile, err = os.Create(*output) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to open output file %q", *output) - } - defer func() { - if err := outfile.Close(); err != nil { - fmt.Fprintf(os.Stderr, "failed to close output file %q", *output) - os.Exit(1) - } - }() - } - - if err := gob.NewEncoder(outfile).Encode(pkg); err != nil { - fmt.Fprintf(os.Stderr, "gob encode: %v\n", err) - os.Exit(1) - } -} -`)) diff --git a/vendor/github.com/golang/mock/mockgen/version.1.11.go b/vendor/github.com/golang/mock/mockgen/version.1.11.go deleted file mode 100644 index e6b25db238..0000000000 --- a/vendor/github.com/golang/mock/mockgen/version.1.11.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2019 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. - -// +build !go1.12 - -package main - -import ( - "log" -) - -func printModuleVersion() { - log.Printf("No version information is available for Mockgen compiled with " + - "version 1.11") -} diff --git a/vendor/github.com/google/btree/btree.go b/vendor/github.com/google/btree/btree.go index 6f5184fef7..5b1c943206 100644 --- a/vendor/github.com/google/btree/btree.go +++ b/vendor/github.com/google/btree/btree.go @@ -23,7 +23,9 @@ // It has a flatter structure than an equivalent red-black or other binary tree, // which in some cases yields better memory usage and/or performance. // See some discussion on the matter here: -// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// +// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// // Note, though, that this project is in no way related to the C++ B-Tree // implementation written about there. // @@ -31,13 +33,14 @@ // slice of children. For basic numeric values or raw structs, this can cause // efficiency differences when compared to equivalent C++ template code that // stores values in arrays within the node: -// * Due to the overhead of storing values as interfaces (each +// - Due to the overhead of storing values as interfaces (each // value needs to be stored as the value itself, then 2 words for the // interface pointing to that value and its type), resulting in higher // memory use. -// * Since interfaces can point to values anywhere in memory, values are +// - Since interfaces can point to values anywhere in memory, values are // most likely not stored in contiguous blocks, resulting in a higher // number of cache misses. +// // These issues don't tend to matter, though, when working with strings or other // heap-allocated structures, since C++-equivalent structures also must store // pointers and also distribute their values across the heap. @@ -242,8 +245,8 @@ func (s *children) truncate(index int) { // node is an internal node in a tree. // // It must at all times maintain the invariant that either -// * len(children) == 0, len(items) unconstrained -// * len(children) == len(items) + 1 +// - len(children) == 0, len(items) unconstrained +// - len(children) == len(items) + 1 type node struct { items items children children @@ -437,15 +440,20 @@ func (n *node) remove(item Item, minItems int, typ toRemove) Item { // remove it. // // Most documentation says we have to do two sets of special casing: -// 1) item is in this node -// 2) item is in child +// 1. item is in this node +// 2. item is in child +// // In both cases, we need to handle the two subcases: -// A) node has enough values that it can spare one -// B) node doesn't have enough values +// +// A) node has enough values that it can spare one +// B) node doesn't have enough values +// // For the latter, we have to check: -// a) left sibling has node to spare -// b) right sibling has node to spare -// c) we must merge +// +// a) left sibling has node to spare +// b) right sibling has node to spare +// c) we must merge +// // To simplify our code here, we handle cases #1 and #2 the same: // If a node doesn't have enough items, we make sure it does (using a,b,c). // We then simply redo our remove call, and the second time (regardless of @@ -858,13 +866,14 @@ func (t *BTree) Len() int { // one, instead of being lost to the garbage collector. // // This call takes: -// O(1): when addNodesToFreelist is false, this is a single operation. -// O(1): when the freelist is already full, it breaks out immediately -// O(freelist size): when the freelist is empty and the nodes are all owned -// by this tree, nodes are added to the freelist until full. -// O(tree size): when all nodes are owned by another tree, all nodes are -// iterated over looking for nodes to add to the freelist, and due to -// ownership, none are. +// +// O(1): when addNodesToFreelist is false, this is a single operation. +// O(1): when the freelist is already full, it breaks out immediately +// O(freelist size): when the freelist is empty and the nodes are all owned +// by this tree, nodes are added to the freelist until full. +// O(tree size): when all nodes are owned by another tree, all nodes are +// iterated over looking for nodes to add to the freelist, and due to +// ownership, none are. func (t *BTree) Clear(addNodesToFreelist bool) { if t.root != nil && addNodesToFreelist { t.root.reset(t.cow) diff --git a/vendor/github.com/google/btree/btree_generic.go b/vendor/github.com/google/btree/btree_generic.go index e44a0f4880..80daf62efb 100644 --- a/vendor/github.com/google/btree/btree_generic.go +++ b/vendor/github.com/google/btree/btree_generic.go @@ -28,7 +28,9 @@ // It has a flatter structure than an equivalent red-black or other binary tree, // which in some cases yields better memory usage and/or performance. // See some discussion on the matter here: -// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// +// http://google-opensource.blogspot.com/2013/01/c-containers-that-save-memory-and-time.html +// // Note, though, that this project is in no way related to the C++ B-Tree // implementation written about there. // @@ -36,13 +38,14 @@ // slice of children. For basic numeric values or raw structs, this can cause // efficiency differences when compared to equivalent C++ template code that // stores values in arrays within the node: -// * Due to the overhead of storing values as interfaces (each +// - Due to the overhead of storing values as interfaces (each // value needs to be stored as the value itself, then 2 words for the // interface pointing to that value and its type), resulting in higher // memory use. -// * Since interfaces can point to values anywhere in memory, values are +// - Since interfaces can point to values anywhere in memory, values are // most likely not stored in contiguous blocks, resulting in a higher // number of cache misses. +// // These issues don't tend to matter, though, when working with strings or other // heap-allocated structures, since C++-equivalent structures also must store // pointers and also distribute their values across the heap. @@ -224,8 +227,8 @@ func (s items[T]) find(item T, less func(T, T) bool) (index int, found bool) { // node is an internal node in a tree. // // It must at all times maintain the invariant that either -// * len(children) == 0, len(items) unconstrained -// * len(children) == len(items) + 1 +// - len(children) == 0, len(items) unconstrained +// - len(children) == len(items) + 1 type node[T any] struct { items items[T] children items[*node[T]] @@ -420,15 +423,20 @@ func (n *node[T]) remove(item T, minItems int, typ toRemove) (_ T, _ bool) { // remove it. // // Most documentation says we have to do two sets of special casing: -// 1) item is in this node -// 2) item is in child +// 1. item is in this node +// 2. item is in child +// // In both cases, we need to handle the two subcases: -// A) node has enough values that it can spare one -// B) node doesn't have enough values +// +// A) node has enough values that it can spare one +// B) node doesn't have enough values +// // For the latter, we have to check: -// a) left sibling has node to spare -// b) right sibling has node to spare -// c) we must merge +// +// a) left sibling has node to spare +// b) right sibling has node to spare +// c) we must merge +// // To simplify our code here, we handle cases #1 and #2 the same: // If a node doesn't have enough items, we make sure it does (using a,b,c). // We then simply redo our remove call, and the second time (regardless of @@ -858,13 +866,14 @@ func (t *BTreeG[T]) Len() int { // one, instead of being lost to the garbage collector. // // This call takes: -// O(1): when addNodesToFreelist is false, this is a single operation. -// O(1): when the freelist is already full, it breaks out immediately -// O(freelist size): when the freelist is empty and the nodes are all owned -// by this tree, nodes are added to the freelist until full. -// O(tree size): when all nodes are owned by another tree, all nodes are -// iterated over looking for nodes to add to the freelist, and due to -// ownership, none are. +// +// O(1): when addNodesToFreelist is false, this is a single operation. +// O(1): when the freelist is already full, it breaks out immediately +// O(freelist size): when the freelist is empty and the nodes are all owned +// by this tree, nodes are added to the freelist until full. +// O(tree size): when all nodes are owned by another tree, all nodes are +// iterated over looking for nodes to add to the freelist, and due to +// ownership, none are. func (t *BTreeG[T]) Clear(addNodesToFreelist bool) { if t.root != nil && addNodesToFreelist { t.root.reset(t.cow) @@ -1071,13 +1080,14 @@ func (t *BTree) Len() int { // one, instead of being lost to the garbage collector. // // This call takes: -// O(1): when addNodesToFreelist is false, this is a single operation. -// O(1): when the freelist is already full, it breaks out immediately -// O(freelist size): when the freelist is empty and the nodes are all owned -// by this tree, nodes are added to the freelist until full. -// O(tree size): when all nodes are owned by another tree, all nodes are -// iterated over looking for nodes to add to the freelist, and due to -// ownership, none are. +// +// O(1): when addNodesToFreelist is false, this is a single operation. +// O(1): when the freelist is already full, it breaks out immediately +// O(freelist size): when the freelist is empty and the nodes are all owned +// by this tree, nodes are added to the freelist until full. +// O(tree size): when all nodes are owned by another tree, all nodes are +// iterated over looking for nodes to add to the freelist, and due to +// ownership, none are. func (t *BTree) Clear(addNodesToFreelist bool) { (*BTreeG[Item])(t).Clear(addNodesToFreelist) } diff --git a/vendor/github.com/google/cel-go/common/types/pb/equal.go b/vendor/github.com/google/cel-go/common/types/pb/equal.go index 76893d85ea..275a2a61c9 100644 --- a/vendor/github.com/google/cel-go/common/types/pb/equal.go +++ b/vendor/github.com/google/cel-go/common/types/pb/equal.go @@ -29,10 +29,10 @@ import ( // // - Messages must share the same instance of the type descriptor // - Known set fields are compared using semantics equality -// - Bytes are compared using bytes.Equal -// - Scalar values are compared with operator == -// - List and map types are equal if they have the same length and all elements are equal -// - Messages are equal if they share the same descriptor and all set fields are equal +// - Bytes are compared using bytes.Equal +// - Scalar values are compared with operator == +// - List and map types are equal if they have the same length and all elements are equal +// - Messages are equal if they share the same descriptor and all set fields are equal // - Unknown fields are compared using byte equality // - NaN values are not equal to each other // - google.protobuf.Any values are unpacked before comparison diff --git a/vendor/github.com/google/cel-go/ext/math.go b/vendor/github.com/google/cel-go/ext/math.go index 6df8e37736..fdb333b9af 100644 --- a/vendor/github.com/google/cel-go/ext/math.go +++ b/vendor/github.com/google/cel-go/ext/math.go @@ -339,9 +339,9 @@ import ( // // Examples: // -// math.sqrt(81) // returns 9.0 -// math.sqrt(985.25) // returns 31.388692231439016 -// math.sqrt(-15) // returns NaN +// math.sqrt(81) // returns 9.0 +// math.sqrt(985.25) // returns 31.388692231439016 +// math.sqrt(-15) // returns NaN func Math(options ...MathOption) cel.EnvOption { m := &mathLib{version: math.MaxUint32} for _, o := range options { @@ -723,21 +723,19 @@ func sign(val ref.Val) ref.Val { } } - func sqrt(val ref.Val) ref.Val { switch v := val.(type) { case types.Double: - return types.Double(math.Sqrt(float64(v))) + return types.Double(math.Sqrt(float64(v))) case types.Int: - return types.Double(math.Sqrt(float64(v))) + return types.Double(math.Sqrt(float64(v))) case types.Uint: - return types.Double(math.Sqrt(float64(v))) + return types.Double(math.Sqrt(float64(v))) default: - return types.NewErr("no such overload: sqrt") + return types.NewErr("no such overload: sqrt") } } - func bitAndPairInt(first, second ref.Val) ref.Val { l := first.(types.Int) r := second.(types.Int) diff --git a/vendor/github.com/google/gnostic-models/jsonschema/base.go b/vendor/github.com/google/gnostic-models/jsonschema/base.go index 5fcc4885a0..a01b1b0d63 100644 --- a/vendor/github.com/google/gnostic-models/jsonschema/base.go +++ b/vendor/github.com/google/gnostic-models/jsonschema/base.go @@ -20,9 +20,9 @@ import ( "encoding/base64" ) -func baseSchemaBytes() ([]byte, error){ +func baseSchemaBytes() ([]byte, error) { return base64.StdEncoding.DecodeString( -`ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi + `ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi JHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA0L3NjaGVtYSMiLAogICAgImRl c2NyaXB0aW9uIjogIkNvcmUgc2NoZW1hIG1ldGEtc2NoZW1hIiwKICAgICJkZWZpbml0aW9ucyI6IHsK ICAgICAgICAic2NoZW1hQXJyYXkiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImFycmF5IiwKICAgICAg @@ -94,4 +94,5 @@ YXkiIH0sCiAgICAgICAgImFueU9mIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NjaGVtYUFycmF5 IiB9LAogICAgICAgICJvbmVPZiI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIg fSwKICAgICAgICAibm90IjogeyAiJHJlZiI6ICIjIiB9CiAgICB9LAogICAgImRlcGVuZGVuY2llcyI6 IHsKICAgICAgICAiZXhjbHVzaXZlTWF4aW11bSI6IFsgIm1heGltdW0iIF0sCiAgICAgICAgImV4Y2x1 -c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`)} +c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`) +} diff --git a/vendor/github.com/google/uuid/dce.go b/vendor/github.com/google/uuid/dce.go index fa820b9d30..9302a1c1bb 100644 --- a/vendor/github.com/google/uuid/dce.go +++ b/vendor/github.com/google/uuid/dce.go @@ -42,7 +42,7 @@ func NewDCESecurity(domain Domain, id uint32) (UUID, error) { // NewDCEPerson returns a DCE Security (Version 2) UUID in the person // domain with the id returned by os.Getuid. // -// NewDCESecurity(Person, uint32(os.Getuid())) +// NewDCESecurity(Person, uint32(os.Getuid())) func NewDCEPerson() (UUID, error) { return NewDCESecurity(Person, uint32(os.Getuid())) } @@ -50,7 +50,7 @@ func NewDCEPerson() (UUID, error) { // NewDCEGroup returns a DCE Security (Version 2) UUID in the group // domain with the id returned by os.Getgid. // -// NewDCESecurity(Group, uint32(os.Getgid())) +// NewDCESecurity(Group, uint32(os.Getgid())) func NewDCEGroup() (UUID, error) { return NewDCESecurity(Group, uint32(os.Getgid())) } diff --git a/vendor/github.com/google/uuid/hash.go b/vendor/github.com/google/uuid/hash.go index dc60082d3b..cee37578b3 100644 --- a/vendor/github.com/google/uuid/hash.go +++ b/vendor/github.com/google/uuid/hash.go @@ -45,7 +45,7 @@ func NewHash(h hash.Hash, space UUID, data []byte, version int) UUID { // NewMD5 returns a new MD5 (Version 3) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(md5.New(), space, data, 3) +// NewHash(md5.New(), space, data, 3) func NewMD5(space UUID, data []byte) UUID { return NewHash(md5.New(), space, data, 3) } @@ -53,7 +53,7 @@ func NewMD5(space UUID, data []byte) UUID { // NewSHA1 returns a new SHA1 (Version 5) UUID based on the // supplied name space and data. It is the same as calling: // -// NewHash(sha1.New(), space, data, 5) +// NewHash(sha1.New(), space, data, 5) func NewSHA1(space UUID, data []byte) UUID { return NewHash(sha1.New(), space, data, 5) } diff --git a/vendor/github.com/google/uuid/node_js.go b/vendor/github.com/google/uuid/node_js.go index b2a0bc8711..f745d7017f 100644 --- a/vendor/github.com/google/uuid/node_js.go +++ b/vendor/github.com/google/uuid/node_js.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build js // +build js package uuid diff --git a/vendor/github.com/google/uuid/node_net.go b/vendor/github.com/google/uuid/node_net.go index 0cbbcddbd6..e91358f7d9 100644 --- a/vendor/github.com/google/uuid/node_net.go +++ b/vendor/github.com/google/uuid/node_net.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !js // +build !js package uuid diff --git a/vendor/github.com/google/uuid/null.go b/vendor/github.com/google/uuid/null.go index d7fcbf2865..06ecf9de2a 100644 --- a/vendor/github.com/google/uuid/null.go +++ b/vendor/github.com/google/uuid/null.go @@ -17,15 +17,14 @@ var jsonNull = []byte("null") // NullUUID implements the SQL driver.Scanner interface so // it can be used as a scan destination: // -// var u uuid.NullUUID -// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) -// ... -// if u.Valid { -// // use u.UUID -// } else { -// // NULL value -// } -// +// var u uuid.NullUUID +// err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&u) +// ... +// if u.Valid { +// // use u.UUID +// } else { +// // NULL value +// } type NullUUID struct { UUID UUID Valid bool // Valid is true if UUID is not NULL diff --git a/vendor/github.com/google/uuid/uuid.go b/vendor/github.com/google/uuid/uuid.go index 5232b48678..1051192bc5 100644 --- a/vendor/github.com/google/uuid/uuid.go +++ b/vendor/github.com/google/uuid/uuid.go @@ -187,10 +187,12 @@ func Must(uuid UUID, err error) UUID { } // Validate returns an error if s is not a properly formatted UUID in one of the following formats: -// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// +// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +// xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} +// // It returns an error if the format is invalid, otherwise nil. func Validate(s string) error { switch len(s) { diff --git a/vendor/github.com/google/uuid/version4.go b/vendor/github.com/google/uuid/version4.go index 7697802e4d..62ac273815 100644 --- a/vendor/github.com/google/uuid/version4.go +++ b/vendor/github.com/google/uuid/version4.go @@ -9,7 +9,7 @@ import "io" // New creates a new random UUID or panics. New is equivalent to // the expression // -// uuid.Must(uuid.NewRandom()) +// uuid.Must(uuid.NewRandom()) func New() UUID { return Must(NewRandom()) } @@ -17,7 +17,7 @@ func New() UUID { // NewString creates a new random UUID and returns it as a string or panics. // NewString is equivalent to the expression // -// uuid.New().String() +// uuid.New().String() func NewString() string { return Must(NewRandom()).String() } @@ -31,11 +31,11 @@ func NewString() string { // // A note about uniqueness derived from the UUID Wikipedia entry: // -// Randomly generated UUIDs have 122 random bits. One's annual risk of being -// hit by a meteorite is estimated to be one chance in 17 billion, that -// means the probability is about 0.00000000006 (6 × 10−11), -// equivalent to the odds of creating a few tens of trillions of UUIDs in a -// year and having one duplicate. +// Randomly generated UUIDs have 122 random bits. One's annual risk of being +// hit by a meteorite is estimated to be one chance in 17 billion, that +// means the probability is about 0.00000000006 (6 × 10−11), +// equivalent to the odds of creating a few tens of trillions of UUIDs in a +// year and having one duplicate. func NewRandom() (UUID, error) { if !poolEnabled { return NewRandomFromReader(rander) diff --git a/vendor/github.com/googleapis/gnostic/jsonschema/base.go b/vendor/github.com/googleapis/gnostic/jsonschema/base.go index 0af8b148b9..ba0eeb49d9 100644 --- a/vendor/github.com/googleapis/gnostic/jsonschema/base.go +++ b/vendor/github.com/googleapis/gnostic/jsonschema/base.go @@ -1,4 +1,3 @@ - // THIS FILE IS AUTOMATICALLY GENERATED. package jsonschema @@ -7,9 +6,9 @@ import ( "encoding/base64" ) -func baseSchemaBytes() ([]byte, error){ +func baseSchemaBytes() ([]byte, error) { return base64.StdEncoding.DecodeString( -`ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi + `ewogICAgImlkIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDQvc2NoZW1hIyIsCiAgICAi JHNjaGVtYSI6ICJodHRwOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA0L3NjaGVtYSMiLAogICAgImRl c2NyaXB0aW9uIjogIkNvcmUgc2NoZW1hIG1ldGEtc2NoZW1hIiwKICAgICJkZWZpbml0aW9ucyI6IHsK ICAgICAgICAic2NoZW1hQXJyYXkiOiB7CiAgICAgICAgICAgICJ0eXBlIjogImFycmF5IiwKICAgICAg @@ -81,4 +80,5 @@ YXkiIH0sCiAgICAgICAgImFueU9mIjogeyAiJHJlZiI6ICIjL2RlZmluaXRpb25zL3NjaGVtYUFycmF5 IiB9LAogICAgICAgICJvbmVPZiI6IHsgIiRyZWYiOiAiIy9kZWZpbml0aW9ucy9zY2hlbWFBcnJheSIg fSwKICAgICAgICAibm90IjogeyAiJHJlZiI6ICIjIiB9CiAgICB9LAogICAgImRlcGVuZGVuY2llcyI6 IHsKICAgICAgICAiZXhjbHVzaXZlTWF4aW11bSI6IFsgIm1heGltdW0iIF0sCiAgICAgICAgImV4Y2x1 -c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`)} \ No newline at end of file +c2l2ZU1pbmltdW0iOiBbICJtaW5pbXVtIiBdCiAgICB9LAogICAgImRlZmF1bHQiOiB7fQp9Cg==`) +} diff --git a/vendor/github.com/googleapis/gnostic/lib/gnostic.go b/vendor/github.com/googleapis/gnostic/lib/gnostic.go index c95bc3b106..b19559140d 100644 --- a/vendor/github.com/googleapis/gnostic/lib/gnostic.go +++ b/vendor/github.com/googleapis/gnostic/lib/gnostic.go @@ -240,9 +240,11 @@ func isURL(path string) bool { // Write bytes to a named file. // Certain names have special meaning: -// ! writes nothing -// - writes to stdout -// = writes to stderr +// +// ! writes nothing +// - writes to stdout +// = writes to stderr +// // If a directory name is given, the file is written there with // a name derived from the source and extension arguments. func writeFile(name string, bytes []byte, source string, extension string) { diff --git a/vendor/github.com/googleapis/gnostic/plugins/environment.go b/vendor/github.com/googleapis/gnostic/plugins/environment.go index f0ca035be1..585e7dd954 100644 --- a/vendor/github.com/googleapis/gnostic/plugins/environment.go +++ b/vendor/github.com/googleapis/gnostic/plugins/environment.go @@ -14,9 +14,9 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/any" + discovery "github.com/googleapis/gnostic/discovery" openapiv2 "github.com/googleapis/gnostic/openapiv2" openapiv3 "github.com/googleapis/gnostic/openapiv3" - discovery "github.com/googleapis/gnostic/discovery" surface "github.com/googleapis/gnostic/surface" ) diff --git a/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go b/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go index 772c1e54b2..2207ba6065 100644 --- a/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go +++ b/vendor/github.com/googleapis/gnostic/surface/model_openapiv2.go @@ -15,8 +15,8 @@ package surface_v1 import ( - openapiv2 "github.com/googleapis/gnostic/openapiv2" "github.com/googleapis/gnostic/compiler" + openapiv2 "github.com/googleapis/gnostic/openapiv2" "log" "strconv" ) @@ -38,9 +38,9 @@ func newOpenAPI2Builder() *OpenAPI2Builder { // in a way that is more processable by plugins like gnostic-go-generator or gnostic-grpc. // Since OpenAPI schemas can be indefinitely nested, it is a recursive approach to build all Types and Methods. // The basic idea is that whenever we have "named OpenAPI object" (e.g.: NamedSchemaOrReference, NamedMediaType) we: -// 1. Create a Type with that name -// 2. Recursively execute according methods on child schemas (see buildFromSchema function) -// 3. Return a FieldInfo object that describes how the created Type should be represented inside another Type as field. +// 1. Create a Type with that name +// 2. Recursively execute according methods on child schemas (see buildFromSchema function) +// 3. Return a FieldInfo object that describes how the created Type should be represented inside another Type as field. func (b *OpenAPI2Builder) buildModel(document *openapiv2.Document, sourceName string) (*Model, error) { b.model.Types = make([]*Type, 0) b.model.Methods = make([]*Method, 0) @@ -357,11 +357,11 @@ func (b *OpenAPI2Builder) buildFromSchemaOrReference(name string, schema *openap } // Given an OpenAPI schema there are two possibilities: -// 1. The schema is an object/array: We create a type for the object, recursively call according methods for child -// schemas, and then return information on how to use the created Type as field. -// 2. The schema has a scalar type: We return information on how to represent a scalar schema as Field. Fields are -// created whenever Types are created (higher up in the callstack). This possibility can be considered as the "base condition" -// for the recursive approach. +// 1. The schema is an object/array: We create a type for the object, recursively call according methods for child +// schemas, and then return information on how to use the created Type as field. +// 2. The schema has a scalar type: We return information on how to represent a scalar schema as Field. Fields are +// created whenever Types are created (higher up in the callstack). This possibility can be considered as the "base condition" +// for the recursive approach. func (b *OpenAPI2Builder) buildFromSchema(name string, schema *openapiv2.Schema) (fInfo *FieldInfo) { fInfo = &FieldInfo{} diff --git a/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go b/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go index 8628202896..e874e6c920 100644 --- a/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go +++ b/vendor/github.com/googleapis/gnostic/surface/model_openapiv3.go @@ -39,9 +39,9 @@ func newOpenAPI3Builder(document *openapiv3.Document) *OpenAPI3Builder { // in a way that is more processable by plugins like gnostic-go-generator or gnostic-grpc. // Since OpenAPI schemas can be indefinitely nested, it is a recursive approach to build all Types and Methods. // The basic idea is that whenever we have "named OpenAPI object" (e.g.: NamedSchemaOrReference, NamedMediaType) we: -// 1. Create a Type with that name -// 2. Recursively create sub schemas (see buildFromSchema function) -// 3. Return a FieldInfo object that describes how the created Type should be represented inside another Type as field. +// 1. Create a Type with that name +// 2. Recursively create sub schemas (see buildFromSchema function) +// 3. Return a FieldInfo object that describes how the created Type should be represented inside another Type as field. func (b *OpenAPI3Builder) buildModel(document *openapiv3.Document, sourceName string) (*Model, error) { b.model.Types = make([]*Type, 0) b.model.Methods = make([]*Method, 0) @@ -321,11 +321,11 @@ func (b *OpenAPI3Builder) buildFromSchemaOrReference(name string, schemaOrRefere } // Given an OpenAPI schema there are two possibilities: -// 1. The schema is an object/array: We create a type for the object, recursively call according methods for child -// schemas, and then return information on how to use the created Type as field. -// 2. The schema has a scalar type: We return information on how to represent a scalar schema as Field. Fields are -// created whenever Types are created (higher up in the callstack). This possibility can be considered as the "base condition" -// for the recursive approach. +// 1. The schema is an object/array: We create a type for the object, recursively call according methods for child +// schemas, and then return information on how to use the created Type as field. +// 2. The schema has a scalar type: We return information on how to represent a scalar schema as Field. Fields are +// created whenever Types are created (higher up in the callstack). This possibility can be considered as the "base condition" +// for the recursive approach. func (b *OpenAPI3Builder) buildFromSchema(name string, schema *openapiv3.Schema) (fInfo *FieldInfo) { fInfo = &FieldInfo{} // Data types according to: https://swagger.io/docs/specification/data-models/data-types/ diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go index 8db0cef95a..677a827201 100644 --- a/vendor/github.com/gorilla/websocket/doc.go +++ b/vendor/github.com/gorilla/websocket/doc.go @@ -4,40 +4,40 @@ // Package websocket implements the WebSocket protocol defined in RFC 6455. // -// Overview +// # Overview // // The Conn type represents a WebSocket connection. A server application calls // the Upgrader.Upgrade method from an HTTP request handler to get a *Conn: // -// var upgrader = websocket.Upgrader{ -// ReadBufferSize: 1024, -// WriteBufferSize: 1024, -// } +// var upgrader = websocket.Upgrader{ +// ReadBufferSize: 1024, +// WriteBufferSize: 1024, +// } // -// func handler(w http.ResponseWriter, r *http.Request) { -// conn, err := upgrader.Upgrade(w, r, nil) -// if err != nil { -// log.Println(err) -// return -// } -// ... Use conn to send and receive messages. -// } +// func handler(w http.ResponseWriter, r *http.Request) { +// conn, err := upgrader.Upgrade(w, r, nil) +// if err != nil { +// log.Println(err) +// return +// } +// ... Use conn to send and receive messages. +// } // // Call the connection's WriteMessage and ReadMessage methods to send and // receive messages as a slice of bytes. This snippet of code shows how to echo // messages using these methods: // -// for { -// messageType, p, err := conn.ReadMessage() -// if err != nil { -// log.Println(err) -// return -// } -// if err := conn.WriteMessage(messageType, p); err != nil { -// log.Println(err) -// return -// } -// } +// for { +// messageType, p, err := conn.ReadMessage() +// if err != nil { +// log.Println(err) +// return +// } +// if err := conn.WriteMessage(messageType, p); err != nil { +// log.Println(err) +// return +// } +// } // // In above snippet of code, p is a []byte and messageType is an int with value // websocket.BinaryMessage or websocket.TextMessage. @@ -49,24 +49,24 @@ // method to get an io.Reader and read until io.EOF is returned. This snippet // shows how to echo messages using the NextWriter and NextReader methods: // -// for { -// messageType, r, err := conn.NextReader() -// if err != nil { -// return -// } -// w, err := conn.NextWriter(messageType) -// if err != nil { -// return err -// } -// if _, err := io.Copy(w, r); err != nil { -// return err -// } -// if err := w.Close(); err != nil { -// return err -// } -// } -// -// Data Messages +// for { +// messageType, r, err := conn.NextReader() +// if err != nil { +// return +// } +// w, err := conn.NextWriter(messageType) +// if err != nil { +// return err +// } +// if _, err := io.Copy(w, r); err != nil { +// return err +// } +// if err := w.Close(); err != nil { +// return err +// } +// } +// +// # Data Messages // // The WebSocket protocol distinguishes between text and binary data messages. // Text messages are interpreted as UTF-8 encoded text. The interpretation of @@ -80,7 +80,7 @@ // It is the application's responsibility to ensure that text messages are // valid UTF-8 encoded text. // -// Control Messages +// # Control Messages // // The WebSocket protocol defines three types of control messages: close, ping // and pong. Call the connection WriteControl, WriteMessage or NextWriter @@ -110,16 +110,16 @@ // in messages from the peer, then the application should start a goroutine to // read and discard messages from the peer. A simple example is: // -// func readLoop(c *websocket.Conn) { -// for { -// if _, _, err := c.NextReader(); err != nil { -// c.Close() -// break -// } -// } -// } +// func readLoop(c *websocket.Conn) { +// for { +// if _, _, err := c.NextReader(); err != nil { +// c.Close() +// break +// } +// } +// } // -// Concurrency +// # Concurrency // // Connections support one concurrent reader and one concurrent writer. // @@ -133,7 +133,7 @@ // The Close and WriteControl methods can be called concurrently with all other // methods. // -// Origin Considerations +// # Origin Considerations // // Web browsers allow Javascript applications to open a WebSocket connection to // any host. It's up to the server to enforce an origin policy using the Origin @@ -151,7 +151,7 @@ // checking. The application is responsible for checking the Origin header // before calling the Upgrade function. // -// Buffers +// # Buffers // // Connections buffer network input and output to reduce the number // of system calls when reading or writing messages. @@ -198,16 +198,16 @@ // buffer size has a reduced impact on total memory use and has the benefit of // reducing system calls and frame overhead. // -// Compression EXPERIMENTAL +// # Compression EXPERIMENTAL // // Per message compression extensions (RFC 7692) are experimentally supported // by this package in a limited capacity. Setting the EnableCompression option // to true in Dialer or Upgrader will attempt to negotiate per message deflate // support. // -// var upgrader = websocket.Upgrader{ -// EnableCompression: true, -// } +// var upgrader = websocket.Upgrader{ +// EnableCompression: true, +// } // // If compression was successfully negotiated with the connection's peer, any // message received in compressed form will be automatically decompressed. @@ -216,7 +216,7 @@ // Per message compression of messages written to a connection can be enabled // or disabled by calling the corresponding Conn method: // -// conn.EnableWriteCompression(false) +// conn.EnableWriteCompression(false) // // Currently this package does not support compression with "context takeover". // This means that messages must be compressed and decompressed in isolation, diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go index 02ea01fdcd..bd734f0163 100644 --- a/vendor/github.com/gorilla/websocket/server.go +++ b/vendor/github.com/gorilla/websocket/server.go @@ -370,4 +370,3 @@ func (b *brNetConn) Read(p []byte) (n int, err error) { func (b *brNetConn) NetConn() net.Conn { return b.Conn } - diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.12-.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.12-.go index 0f575fe294..636cfd936c 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.12-.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.12-.go @@ -1,3 +1,4 @@ +//go:build !go1.13 // +build !go1.13 package grpcstatus diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.13+.go b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.13+.go index 216d057e89..7536852488 100644 --- a/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.13+.go +++ b/vendor/github.com/grpc-ecosystem/go-grpc-prometheus/packages/grpcstatus/native_unwrap1.13+.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package grpcstatus diff --git a/vendor/github.com/grpc-ecosystem/grpc-health-probe/main.go b/vendor/github.com/grpc-ecosystem/grpc-health-probe/main.go index 7a30f72cb3..6f90e11053 100644 --- a/vendor/github.com/grpc-ecosystem/grpc-health-probe/main.go +++ b/vendor/github.com/grpc-ecosystem/grpc-health-probe/main.go @@ -4,7 +4,7 @@ // 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 +// 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, diff --git a/vendor/github.com/h2non/filetype/matchers/archive.go b/vendor/github.com/h2non/filetype/matchers/archive.go index ee618a9254..dd892cedcb 100644 --- a/vendor/github.com/h2non/filetype/matchers/archive.go +++ b/vendor/github.com/h2non/filetype/matchers/archive.go @@ -191,21 +191,21 @@ func MachO(buf []byte) bool { // There are two frame formats defined by Zstandard: Zstandard frames and Skippable frames. // See more details from https://tools.ietf.org/id/draft-kucherawy-dispatch-zstd-00.html#rfc.section.2 func Zst(buf []byte) bool { - if compareBytes(buf, zstdMagic, 0) { - return true - } else { + if compareBytes(buf, zstdMagic, 0) { + return true + } else { // skippable frames - if len(buf) < 8 { - return false - } - if binary.LittleEndian.Uint32(buf[:4]) & ZstdMagicSkippableMask == ZstdMagicSkippableStart { - userDataLength := binary.LittleEndian.Uint32(buf[4:8]) - if len(buf) < 8 + int(userDataLength) { - return false - } - nextFrame := buf[8+userDataLength:] - return Zst(nextFrame) - } - return false - } + if len(buf) < 8 { + return false + } + if binary.LittleEndian.Uint32(buf[:4])&ZstdMagicSkippableMask == ZstdMagicSkippableStart { + userDataLength := binary.LittleEndian.Uint32(buf[4:8]) + if len(buf) < 8+int(userDataLength) { + return false + } + nextFrame := buf[8+userDataLength:] + return Zst(nextFrame) + } + return false + } } diff --git a/vendor/github.com/h2non/filetype/matchers/document.go b/vendor/github.com/h2non/filetype/matchers/document.go index b898c0ff75..f8d7f72908 100644 --- a/vendor/github.com/h2non/filetype/matchers/document.go +++ b/vendor/github.com/h2non/filetype/matchers/document.go @@ -35,7 +35,7 @@ const ( TYPE_OOXML ) -//reference: https://bz.apache.org/ooo/show_bug.cgi?id=111457 +// reference: https://bz.apache.org/ooo/show_bug.cgi?id=111457 func Doc(buf []byte) bool { if len(buf) > 513 { return buf[0] == 0xD0 && buf[1] == 0xCF && diff --git a/vendor/github.com/itchyny/gojq/builtin.go b/vendor/github.com/itchyny/gojq/builtin.go index 8ae4666cba..bc2668dee4 100644 --- a/vendor/github.com/itchyny/gojq/builtin.go +++ b/vendor/github.com/itchyny/gojq/builtin.go @@ -4,67 +4,67 @@ package gojq func init() { builtinFuncDefs = map[string][]*FuncDef{ - "IN": {{Name: "IN", Args: []string{"s"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Left: &Query{Func: "s"}, Op: OpEq, Right: &Query{Func: "."}}, {Func: "."}}}}}}, {Name: "IN", Args: []string{"src", "s"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Left: &Query{Func: "src"}, Op: OpEq, Right: &Query{Func: "s"}}, {Func: "."}}}}}}}, - "INDEX": {{Name: "INDEX", Args: []string{"stream", "idx_expr"}, Body: &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{Query: &Query{Func: "stream"}, Pattern: &Pattern{Name: "$row"}, Start: &Query{Term: &Term{Type: TermTypeObject, Object: &Object{}}}, Update: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Left: &Query{Func: "$row"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "idx_expr"}, Op: OpPipe, Right: &Query{Func: "tostring"}}}}}}, Op: OpAssign, Right: &Query{Func: "$row"}}}}}}, {Name: "INDEX", Args: []string{"idx_expr"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "INDEX", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, {Func: "idx_expr"}}}}}}}, - "JOIN": {{Name: "JOIN", Args: []string{"$idx", "idx_expr"}, Body: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$idx"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Func: "idx_expr"}}}}}}}}}}}}}}}, {Name: "JOIN", Args: []string{"$idx", "stream", "idx_expr"}, Body: &Query{Left: &Query{Func: "stream"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$idx"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Func: "idx_expr"}}}}}}}}}}}}, {Name: "JOIN", Args: []string{"$idx", "stream", "idx_expr", "join_expr"}, Body: &Query{Left: &Query{Func: "stream"}, Op: OpPipe, Right: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$idx"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Func: "idx_expr"}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "join_expr"}}}}}, - "_assign": {}, - "_modify": {}, - "add": {{Name: "add", Args: []string{"f"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}, Op: OpPipe, Right: &Query{Func: "add"}}}}, - "all": {{Name: "all", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "all", Args: []*Query{{Func: "."}}}}}}, {Name: "all", Args: []string{"y"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "all", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, {Func: "y"}}}}}}, {Name: "all", Args: []string{"g", "y"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "isempty", Args: []*Query{{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "y"}, Op: OpPipe, Right: &Query{Func: "not"}}}}}}}}}}}}}, - "any": {{Name: "any", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Func: "."}}}}}}, {Name: "any", Args: []string{"y"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, {Func: "y"}}}}}}, {Name: "any", Args: []string{"g", "y"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "isempty", Args: []*Query{{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "y"}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "not"}}}}, - "arrays": {{Name: "arrays", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}}}}}}}, - "booleans": {{Name: "booleans", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "boolean"}}}}}}}}}}, - "capture": {{Name: "capture", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "capture", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "capture", Args: []string{"$re", "$flags"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}}}}}, Op: OpPipe, Right: &Query{Func: "_capture"}}}}, - "combinations": {{Name: "combinations", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}, Else: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, SuffixList: []*Suffix{{Iter: true}, {Bind: &Bind{Patterns: []*Pattern{{Name: "$x"}}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "$x"}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}, IsSlice: true}}}, Op: OpPipe, Right: &Query{Func: "combinations"}}}}}}}}}}}}}}, {Name: "combinations", Args: []string{"n"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "limit", Args: []*Query{{Func: "n"}, {Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "repeat", Args: []*Query{{Func: "."}}}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "combinations"}}}}, - "del": {{Name: "del", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "delpaths", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Func: "f"}}}}}}}}}}}}}}, - "finites": {{Name: "finites", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "isfinite"}}}}}}}, - "first": {{Name: "first", Body: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}}}}, {Name: "first", Args: []string{"g"}, Body: &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{Ident: "$out", Body: &Query{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeBreak, Break: "$out"}}}}}}}}}, - "fromdate": {{Name: "fromdate", Body: &Query{Func: "fromdateiso8601"}}}, + "IN": {{Name: "IN", Args: []string{"s"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Left: &Query{Func: "s"}, Op: OpEq, Right: &Query{Func: "."}}, {Func: "."}}}}}}, {Name: "IN", Args: []string{"src", "s"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Left: &Query{Func: "src"}, Op: OpEq, Right: &Query{Func: "s"}}, {Func: "."}}}}}}}, + "INDEX": {{Name: "INDEX", Args: []string{"stream", "idx_expr"}, Body: &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{Query: &Query{Func: "stream"}, Pattern: &Pattern{Name: "$row"}, Start: &Query{Term: &Term{Type: TermTypeObject, Object: &Object{}}}, Update: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Left: &Query{Func: "$row"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "idx_expr"}, Op: OpPipe, Right: &Query{Func: "tostring"}}}}}}, Op: OpAssign, Right: &Query{Func: "$row"}}}}}}, {Name: "INDEX", Args: []string{"idx_expr"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "INDEX", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, {Func: "idx_expr"}}}}}}}, + "JOIN": {{Name: "JOIN", Args: []string{"$idx", "idx_expr"}, Body: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$idx"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Func: "idx_expr"}}}}}}}}}}}}}}}, {Name: "JOIN", Args: []string{"$idx", "stream", "idx_expr"}, Body: &Query{Left: &Query{Func: "stream"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$idx"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Func: "idx_expr"}}}}}}}}}}}}, {Name: "JOIN", Args: []string{"$idx", "stream", "idx_expr", "join_expr"}, Body: &Query{Left: &Query{Func: "stream"}, Op: OpPipe, Right: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$idx"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Func: "idx_expr"}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "join_expr"}}}}}, + "_assign": {}, + "_modify": {}, + "add": {{Name: "add", Args: []string{"f"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}, Op: OpPipe, Right: &Query{Func: "add"}}}}, + "all": {{Name: "all", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "all", Args: []*Query{{Func: "."}}}}}}, {Name: "all", Args: []string{"y"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "all", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, {Func: "y"}}}}}}, {Name: "all", Args: []string{"g", "y"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "isempty", Args: []*Query{{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "y"}, Op: OpPipe, Right: &Query{Func: "not"}}}}}}}}}}}}}, + "any": {{Name: "any", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Func: "."}}}}}}, {Name: "any", Args: []string{"y"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "any", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, {Func: "y"}}}}}}, {Name: "any", Args: []string{"g", "y"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "isempty", Args: []*Query{{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "y"}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "not"}}}}, + "arrays": {{Name: "arrays", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}}}}}}}, + "booleans": {{Name: "booleans", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "boolean"}}}}}}}}}}, + "capture": {{Name: "capture", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "capture", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "capture", Args: []string{"$re", "$flags"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}}}}}, Op: OpPipe, Right: &Query{Func: "_capture"}}}}, + "combinations": {{Name: "combinations", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}, Else: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, SuffixList: []*Suffix{{Iter: true}, {Bind: &Bind{Patterns: []*Pattern{{Name: "$x"}}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "$x"}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}, IsSlice: true}}}, Op: OpPipe, Right: &Query{Func: "combinations"}}}}}}}}}}}}}}, {Name: "combinations", Args: []string{"n"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "limit", Args: []*Query{{Func: "n"}, {Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "repeat", Args: []*Query{{Func: "."}}}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "combinations"}}}}, + "del": {{Name: "del", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "delpaths", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Func: "f"}}}}}}}}}}}}}}, + "finites": {{Name: "finites", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "isfinite"}}}}}}}, + "first": {{Name: "first", Body: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}}}}, {Name: "first", Args: []string{"g"}, Body: &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{Ident: "$out", Body: &Query{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeBreak, Break: "$out"}}}}}}}}}, + "fromdate": {{Name: "fromdate", Body: &Query{Func: "fromdateiso8601"}}}, "fromdateiso8601": {{Name: "fromdateiso8601", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "strptime", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "%Y-%m-%dT%H:%M:%S%z"}}}}}}}, Op: OpPipe, Right: &Query{Func: "mktime"}}}}, - "fromstream": {{Name: "fromstream", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{Query: &Query{Func: "f"}, Pattern: &Pattern{Name: "$pv"}, Start: &Query{Func: "null"}, Update: &Query{Left: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "e"}}}, Then: &Query{Func: "null"}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$pv"}, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Array: []*Pattern{{Name: "$p"}, {Name: "$v"}}}}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$pv"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "2"}}}}, Then: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "v"}}}}}}, Op: OpAdd, Right: &Query{Func: "$p"}}, {Func: "$v"}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "e"}}}}}}, {Left: &Query{Func: "$p"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}}}}}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "e"}}}}}}, {Left: &Query{Func: "$p"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}}}}}}}}}}}, Extract: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "e"}}}, Then: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "v"}}}, Else: &Query{Func: "empty"}}}}}}}}}, - "group_by": {{Name: "group_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_group_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, - "gsub": {{Name: "gsub", Args: []string{"$re", "str"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "sub", Args: []*Query{{Func: "$re"}, {Func: "str"}, {Term: &Term{Type: TermTypeString, Str: &String{Str: "g"}}}}}}}}, {Name: "gsub", Args: []string{"$re", "str", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "sub", Args: []*Query{{Func: "$re"}, {Func: "str"}, {Left: &Query{Func: "$flags"}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "g"}}}}}}}}}}, - "in": {{Name: "in", Args: []string{"xs"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$x"}}, Body: &Query{Left: &Query{Func: "xs"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "has", Args: []*Query{{Func: "$x"}}}}}}}}}}}}}, - "inputs": {{Name: "inputs", Body: &Query{Term: &Term{Type: TermTypeTry, Try: &Try{Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "repeat", Args: []*Query{{Func: "input"}}}}}, Catch: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "break"}}}}, Then: &Query{Func: "empty"}, Else: &Query{Func: "error"}}}}}}}}}, - "inside": {{Name: "inside", Args: []string{"xs"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$x"}}, Body: &Query{Left: &Query{Func: "xs"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "contains", Args: []*Query{{Func: "$x"}}}}}}}}}}}}}, - "isempty": {{Name: "isempty", Args: []string{"g"}, Body: &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{Ident: "$out", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "false"}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeBreak, Break: "$out"}}}}}}, Op: OpComma, Right: &Query{Func: "true"}}}}}}}, - "iterables": {{Name: "iterables", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpPipe, Right: &Query{Left: &Query{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}, Op: OpOr, Right: &Query{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}}}}}}}}}, - "last": {{Name: "last", Body: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeUnary, Unary: &Unary{Op: OpSub, Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}}}, - "limit": {{Name: "limit", Args: []string{"$n", "g"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpGt, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{Ident: "$out", Body: &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{Query: &Query{Func: "g"}, Pattern: &Pattern{Name: "$item"}, Start: &Query{Func: "$n"}, Update: &Query{Left: &Query{Func: "."}, Op: OpSub, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}}, Extract: &Query{Left: &Query{Func: "$item"}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "."}, Op: OpLe, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeBreak, Break: "$out"}}, Else: &Query{Func: "empty"}}}}}}}}}}}, Elif: []*IfElif{{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Func: "empty"}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "error", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "limit doesn't support negative count"}}}}}}}}}}}}, - "map": {{Name: "map", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, Op: OpPipe, Right: &Query{Func: "f"}}}}}}}, - "map_values": {{Name: "map_values", Args: []string{"f"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, Op: OpModify, Right: &Query{Func: "f"}}}}, - "match": {{Name: "match", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "match", Args: []string{"$re", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}, {Func: "false"}}}, SuffixList: []*Suffix{{Iter: true}}}}}}, - "max_by": {{Name: "max_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_max_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, - "min_by": {{Name: "min_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_min_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, - "normals": {{Name: "normals", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "isnormal"}}}}}}}, - "not": {{Name: "not", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "."}, Then: &Query{Func: "false"}, Else: &Query{Func: "true"}}}}}}, - "nth": {{Name: "nth", Args: []string{"$n"}, Body: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Func: "$n"}}}}}, {Name: "nth", Args: []string{"$n", "g"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpGe, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "first", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "skip", Args: []*Query{{Func: "$n"}, {Func: "g"}}}}}}}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "error", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "nth doesn't support negative index"}}}}}}}}}}}}, - "nulls": {{Name: "nulls", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Func: "null"}}}}}}}}, - "numbers": {{Name: "numbers", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "number"}}}}}}}}}}, - "objects": {{Name: "objects", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}}}}}}}, - "paths": {{Name: "paths", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Func: ".."}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}}}}}}}, {Name: "paths", Args: []string{"f"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Left: &Query{Func: ".."}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "f"}}}}}}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}}}}}}}}, - "pick": {{Name: "pick", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$v"}}, Body: &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Func: "f"}}}}}, Pattern: &Pattern{Name: "$p"}, Start: &Query{Func: "null"}, Update: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Func: "$p"}, {Left: &Query{Func: "$v"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "getpath", Args: []*Query{{Func: "$p"}}}}}}}}}}}}}}}}}}}}, - "range": {{Name: "range", Args: []string{"$end"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_range", Args: []*Query{{Term: &Term{Type: TermTypeNumber, Number: "0"}}, {Func: "$end"}, {Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}, {Name: "range", Args: []string{"$start", "$end"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_range", Args: []*Query{{Func: "$start"}, {Func: "$end"}, {Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}, {Name: "range", Args: []string{"$start", "$end", "$step"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_range", Args: []*Query{{Func: "$start"}, {Func: "$end"}, {Func: "$step"}}}}}}}, - "recurse": {{Name: "recurse", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "recurse", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}, {Optional: true}}}}}}}}}, {Name: "recurse", Args: []string{"f"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "r", Body: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "f"}, Op: OpPipe, Right: &Query{Func: "r"}}}}}}}, Func: "r"}}, {Name: "recurse", Args: []string{"f", "cond"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "r", Body: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "f"}, Op: OpPipe, Right: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "cond"}}}}}, Op: OpPipe, Right: &Query{Func: "r"}}}}}}}}, Func: "r"}}}, - "repeat": {{Name: "repeat", Args: []string{"f"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_repeat", Body: &Query{Left: &Query{Func: "f"}, Op: OpComma, Right: &Query{Func: "_repeat"}}}}, Func: "_repeat"}}}, - "scalars": {{Name: "scalars", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpPipe, Right: &Query{Left: &Query{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}, Op: OpAnd, Right: &Query{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}}}}}}}}}, - "scan": {{Name: "scan", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "scan", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "scan", Args: []string{"$re", "$flags"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Left: &Query{Func: "$flags"}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "g"}}}}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "captures"}}}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}, Then: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "string"}}}, Else: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "captures"}, SuffixList: []*Suffix{{Iter: true}, {Index: &Index{Name: "string"}}}}}}}}}}}}}}, - "select": {{Name: "select", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "f"}, Then: &Query{Func: "."}, Else: &Query{Func: "empty"}}}}}}, - "skip": {{Name: "skip", Args: []string{"$n", "g"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpGt, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{Query: &Query{Func: "g"}, Pattern: &Pattern{Name: "$item"}, Start: &Query{Func: "$n"}, Update: &Query{Left: &Query{Func: "."}, Op: OpSub, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}}, Extract: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "."}, Op: OpLt, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Func: "$item"}, Else: &Query{Func: "empty"}}}}}}}, Elif: []*IfElif{{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Func: "g"}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "error", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "skip doesn't support negative count"}}}}}}}}}}}}, - "sort_by": {{Name: "sort_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_sort_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, - "splits": {{Name: "splits", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "splits", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "splits", Args: []string{"$re", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "split", Args: []*Query{{Func: "$re"}, {Func: "$flags"}}}, SuffixList: []*Suffix{{Iter: true}}}}}}, - "strings": {{Name: "strings", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "string"}}}}}}}}}}, - "sub": {{Name: "sub", Args: []string{"$re", "str"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "sub", Args: []*Query{{Func: "$re"}, {Func: "str"}, {Func: "null"}}}}}}, {Name: "sub", Args: []string{"$re", "str", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$str"}}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_sub", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "matches"}}}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}, Then: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$str"}, SuffixList: []*Suffix{{Index: &Index{End: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "offset"}}}, IsSlice: true}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "string"}}}}, Else: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "matches"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Term: &Term{Type: TermTypeUnary, Unary: &Unary{Op: OpSub, Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}, {Bind: &Bind{Patterns: []*Pattern{{Name: "$r"}}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeObject, Object: &Object{KeyVals: []*ObjectKeyVal{{Key: "string", Val: &Query{Left: &Query{Left: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "$r"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "_capture"}, Op: OpPipe, Right: &Query{Func: "str"}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$str"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$r"}, SuffixList: []*Suffix{{Index: &Index{Name: "offset"}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$r"}, SuffixList: []*Suffix{{Index: &Index{Name: "length"}}}}}}, End: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "offset"}}}, IsSlice: true}}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "string"}}}}}, {Key: "offset", Val: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$r"}, SuffixList: []*Suffix{{Index: &Index{Name: "offset"}}}}}}, {Key: "matches", Val: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "matches"}, SuffixList: []*Suffix{{Index: &Index{End: &Query{Term: &Term{Type: TermTypeUnary, Unary: &Unary{Op: OpSub, Term: &Term{Type: TermTypeNumber, Number: "1"}}}}, IsSlice: true}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "_sub"}}}}}}}}}}}}, Left: &Query{Term: &Term{Type: TermTypeObject, Object: &Object{KeyVals: []*ObjectKeyVal{{Key: "string", Val: &Query{Term: &Term{Type: TermTypeString, Str: &String{}}}}, {Key: "matches", Val: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}}}}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "_sub"}}}}}}}}}, - "test": {{Name: "test", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "test", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "test", Args: []string{"$re", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}, {Func: "true"}}}}}}}, - "todate": {{Name: "todate", Body: &Query{Func: "todateiso8601"}}}, - "todateiso8601": {{Name: "todateiso8601", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "strftime", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "%Y-%m-%dT%H:%M:%SZ"}}}}}}}}}, - "tostream": {{Name: "tostream", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{FuncDefs: []*FuncDef{{Name: "r", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}, {Optional: true}}}}, Op: OpPipe, Right: &Query{Func: "r"}}}}, Op: OpComma, Right: &Query{Func: "."}}}}, Func: "r"}}}, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$p"}}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "getpath", Args: []*Query{{Func: "$p"}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}, {Optional: true}}}}}}}}, Pattern: &Pattern{Name: "$q"}, Start: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "$p"}, Op: OpComma, Right: &Query{Func: "."}}}}}, Update: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "$p"}, Op: OpAdd, Right: &Query{Func: "$q"}}}}}}}}}}}}}}}}, + "fromstream": {{Name: "fromstream", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{Query: &Query{Func: "f"}, Pattern: &Pattern{Name: "$pv"}, Start: &Query{Func: "null"}, Update: &Query{Left: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "e"}}}, Then: &Query{Func: "null"}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$pv"}, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Array: []*Pattern{{Name: "$p"}, {Name: "$v"}}}}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$pv"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "2"}}}}, Then: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Left: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "v"}}}}}}, Op: OpAdd, Right: &Query{Func: "$p"}}, {Func: "$v"}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "e"}}}}}}, {Left: &Query{Func: "$p"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}}}}}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "e"}}}}}}, {Left: &Query{Func: "$p"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}}}}}}}}}}}, Extract: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "e"}}}, Then: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "v"}}}, Else: &Query{Func: "empty"}}}}}}}}}, + "group_by": {{Name: "group_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_group_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, + "gsub": {{Name: "gsub", Args: []string{"$re", "str"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "sub", Args: []*Query{{Func: "$re"}, {Func: "str"}, {Term: &Term{Type: TermTypeString, Str: &String{Str: "g"}}}}}}}}, {Name: "gsub", Args: []string{"$re", "str", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "sub", Args: []*Query{{Func: "$re"}, {Func: "str"}, {Left: &Query{Func: "$flags"}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "g"}}}}}}}}}}, + "in": {{Name: "in", Args: []string{"xs"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$x"}}, Body: &Query{Left: &Query{Func: "xs"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "has", Args: []*Query{{Func: "$x"}}}}}}}}}}}}}, + "inputs": {{Name: "inputs", Body: &Query{Term: &Term{Type: TermTypeTry, Try: &Try{Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "repeat", Args: []*Query{{Func: "input"}}}}}, Catch: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "break"}}}}, Then: &Query{Func: "empty"}, Else: &Query{Func: "error"}}}}}}}}}, + "inside": {{Name: "inside", Args: []string{"xs"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$x"}}, Body: &Query{Left: &Query{Func: "xs"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "contains", Args: []*Query{{Func: "$x"}}}}}}}}}}}}}, + "isempty": {{Name: "isempty", Args: []string{"g"}, Body: &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{Ident: "$out", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "g"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "false"}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeBreak, Break: "$out"}}}}}}, Op: OpComma, Right: &Query{Func: "true"}}}}}}}, + "iterables": {{Name: "iterables", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpPipe, Right: &Query{Left: &Query{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}, Op: OpOr, Right: &Query{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}}}}}}}}}, + "last": {{Name: "last", Body: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeUnary, Unary: &Unary{Op: OpSub, Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}}}, + "limit": {{Name: "limit", Args: []string{"$n", "g"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpGt, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeLabel, Label: &Label{Ident: "$out", Body: &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{Query: &Query{Func: "g"}, Pattern: &Pattern{Name: "$item"}, Start: &Query{Func: "$n"}, Update: &Query{Left: &Query{Func: "."}, Op: OpSub, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}}, Extract: &Query{Left: &Query{Func: "$item"}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "."}, Op: OpLe, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeBreak, Break: "$out"}}, Else: &Query{Func: "empty"}}}}}}}}}}}, Elif: []*IfElif{{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Func: "empty"}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "error", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "limit doesn't support negative count"}}}}}}}}}}}}, + "map": {{Name: "map", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, Op: OpPipe, Right: &Query{Func: "f"}}}}}}}, + "map_values": {{Name: "map_values", Args: []string{"f"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}}}}, Op: OpModify, Right: &Query{Func: "f"}}}}, + "match": {{Name: "match", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "match", Args: []string{"$re", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}, {Func: "false"}}}, SuffixList: []*Suffix{{Iter: true}}}}}}, + "max_by": {{Name: "max_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_max_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, + "min_by": {{Name: "min_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_min_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, + "normals": {{Name: "normals", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "isnormal"}}}}}}}, + "not": {{Name: "not", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "."}, Then: &Query{Func: "false"}, Else: &Query{Func: "true"}}}}}}, + "nth": {{Name: "nth", Args: []string{"$n"}, Body: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Func: "$n"}}}}}, {Name: "nth", Args: []string{"$n", "g"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpGe, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "first", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "skip", Args: []*Query{{Func: "$n"}, {Func: "g"}}}}}}}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "error", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "nth doesn't support negative index"}}}}}}}}}}}}, + "nulls": {{Name: "nulls", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpEq, Right: &Query{Func: "null"}}}}}}}}, + "numbers": {{Name: "numbers", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "number"}}}}}}}}}}, + "objects": {{Name: "objects", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}}}}}}}, + "paths": {{Name: "paths", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Func: ".."}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}}}}}}}, {Name: "paths", Args: []string{"f"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Left: &Query{Func: ".."}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "f"}}}}}}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}}}}}}}}, + "pick": {{Name: "pick", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$v"}}, Body: &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Func: "f"}}}}}, Pattern: &Pattern{Name: "$p"}, Start: &Query{Func: "null"}, Update: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "setpath", Args: []*Query{{Func: "$p"}, {Left: &Query{Func: "$v"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "getpath", Args: []*Query{{Func: "$p"}}}}}}}}}}}}}}}}}}}}, + "range": {{Name: "range", Args: []string{"$end"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_range", Args: []*Query{{Term: &Term{Type: TermTypeNumber, Number: "0"}}, {Func: "$end"}, {Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}, {Name: "range", Args: []string{"$start", "$end"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_range", Args: []*Query{{Func: "$start"}, {Func: "$end"}, {Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}}, {Name: "range", Args: []string{"$start", "$end", "$step"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_range", Args: []*Query{{Func: "$start"}, {Func: "$end"}, {Func: "$step"}}}}}}}, + "recurse": {{Name: "recurse", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "recurse", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}, {Optional: true}}}}}}}}}, {Name: "recurse", Args: []string{"f"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "r", Body: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "f"}, Op: OpPipe, Right: &Query{Func: "r"}}}}}}}, Func: "r"}}, {Name: "recurse", Args: []string{"f", "cond"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "r", Body: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "f"}, Op: OpPipe, Right: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Func: "cond"}}}}}, Op: OpPipe, Right: &Query{Func: "r"}}}}}}}}, Func: "r"}}}, + "repeat": {{Name: "repeat", Args: []string{"f"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_repeat", Body: &Query{Left: &Query{Func: "f"}, Op: OpComma, Right: &Query{Func: "_repeat"}}}}, Func: "_repeat"}}}, + "scalars": {{Name: "scalars", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpPipe, Right: &Query{Left: &Query{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}, Op: OpAnd, Right: &Query{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}}}}}}}}}, + "scan": {{Name: "scan", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "scan", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "scan", Args: []string{"$re", "$flags"}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Left: &Query{Func: "$flags"}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "g"}}}}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "captures"}}}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}, Then: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "string"}}}, Else: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "captures"}, SuffixList: []*Suffix{{Iter: true}, {Index: &Index{Name: "string"}}}}}}}}}}}}}}, + "select": {{Name: "select", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "f"}, Then: &Query{Func: "."}, Else: &Query{Func: "empty"}}}}}}, + "skip": {{Name: "skip", Args: []string{"$n", "g"}, Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpGt, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Term: &Term{Type: TermTypeForeach, Foreach: &Foreach{Query: &Query{Func: "g"}, Pattern: &Pattern{Name: "$item"}, Start: &Query{Func: "$n"}, Update: &Query{Left: &Query{Func: "."}, Op: OpSub, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "1"}}}, Extract: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "."}, Op: OpLt, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Func: "$item"}, Else: &Query{Func: "empty"}}}}}}}, Elif: []*IfElif{{Cond: &Query{Left: &Query{Func: "$n"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}, Then: &Query{Func: "g"}}}, Else: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "error", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "skip doesn't support negative count"}}}}}}}}}}}}, + "sort_by": {{Name: "sort_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_sort_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, + "splits": {{Name: "splits", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "splits", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "splits", Args: []string{"$re", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "split", Args: []*Query{{Func: "$re"}, {Func: "$flags"}}}, SuffixList: []*Suffix{{Iter: true}}}}}}, + "strings": {{Name: "strings", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "string"}}}}}}}}}}, + "sub": {{Name: "sub", Args: []string{"$re", "str"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "sub", Args: []*Query{{Func: "$re"}, {Func: "str"}, {Func: "null"}}}}}}, {Name: "sub", Args: []string{"$re", "str", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$str"}}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_sub", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "matches"}}}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{}}}}, Then: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$str"}, SuffixList: []*Suffix{{Index: &Index{End: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "offset"}}}, IsSlice: true}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "string"}}}}, Else: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "matches"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Term: &Term{Type: TermTypeUnary, Unary: &Unary{Op: OpSub, Term: &Term{Type: TermTypeNumber, Number: "1"}}}}}}, {Bind: &Bind{Patterns: []*Pattern{{Name: "$r"}}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeObject, Object: &Object{KeyVals: []*ObjectKeyVal{{Key: "string", Val: &Query{Left: &Query{Left: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "$r"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "_capture"}, Op: OpPipe, Right: &Query{Func: "str"}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$str"}, SuffixList: []*Suffix{{Index: &Index{Start: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$r"}, SuffixList: []*Suffix{{Index: &Index{Name: "offset"}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$r"}, SuffixList: []*Suffix{{Index: &Index{Name: "length"}}}}}}, End: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "offset"}}}, IsSlice: true}}}}}}, Op: OpAdd, Right: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "string"}}}}}, {Key: "offset", Val: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "$r"}, SuffixList: []*Suffix{{Index: &Index{Name: "offset"}}}}}}, {Key: "matches", Val: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Name: "matches"}, SuffixList: []*Suffix{{Index: &Index{End: &Query{Term: &Term{Type: TermTypeUnary, Unary: &Unary{Op: OpSub, Term: &Term{Type: TermTypeNumber, Number: "1"}}}}, IsSlice: true}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "_sub"}}}}}}}}}}}}, Left: &Query{Term: &Term{Type: TermTypeObject, Object: &Object{KeyVals: []*ObjectKeyVal{{Key: "string", Val: &Query{Term: &Term{Type: TermTypeString, Str: &String{}}}}, {Key: "matches", Val: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}}}}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "_sub"}}}}}}}}}, + "test": {{Name: "test", Args: []string{"$re"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "test", Args: []*Query{{Func: "$re"}, {Func: "null"}}}}}}, {Name: "test", Args: []string{"$re", "$flags"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_match", Args: []*Query{{Func: "$re"}, {Func: "$flags"}, {Func: "true"}}}}}}}, + "todate": {{Name: "todate", Body: &Query{Func: "todateiso8601"}}}, + "todateiso8601": {{Name: "todateiso8601", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "strftime", Args: []*Query{{Term: &Term{Type: TermTypeString, Str: &String{Str: "%Y-%m-%dT%H:%M:%SZ"}}}}}}}}}, + "tostream": {{Name: "tostream", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{FuncDefs: []*FuncDef{{Name: "r", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}, {Optional: true}}}}, Op: OpPipe, Right: &Query{Func: "r"}}}}, Op: OpComma, Right: &Query{Func: "."}}}}, Func: "r"}}}, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$p"}}, Body: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "getpath", Args: []*Query{{Func: "$p"}}}}}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeReduce, Reduce: &Reduce{Query: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "path", Args: []*Query{{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Iter: true}, {Optional: true}}}}}}}}, Pattern: &Pattern{Name: "$q"}, Start: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "$p"}, Op: OpComma, Right: &Query{Func: "."}}}}}, Update: &Query{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Left: &Query{Func: "$p"}, Op: OpAdd, Right: &Query{Func: "$q"}}}}}}}}}}}}}}}}, "truncate_stream": {{Name: "truncate_stream", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeIdentity, SuffixList: []*Suffix{{Bind: &Bind{Patterns: []*Pattern{{Name: "$n"}}, Body: &Query{Left: &Query{Func: "null"}, Op: OpPipe, Right: &Query{Left: &Query{Func: "f"}, Op: OpPipe, Right: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}}}, Op: OpPipe, Right: &Query{Left: &Query{Func: "length"}, Op: OpGt, Right: &Query{Func: "$n"}}}, Then: &Query{Left: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Term: &Term{Type: TermTypeNumber, Number: "0"}}}}}, Op: OpModify, Right: &Query{Term: &Term{Type: TermTypeIndex, Index: &Index{Start: &Query{Func: "$n"}, IsSlice: true}}}}, Else: &Query{Func: "empty"}}}}}}}}}}}}}, - "unique_by": {{Name: "unique_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_unique_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, - "until": {{Name: "until", Args: []string{"cond", "next"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_until", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "cond"}, Then: &Query{Func: "."}, Else: &Query{Left: &Query{Func: "next"}, Op: OpPipe, Right: &Query{Func: "_until"}}}}}}}, Func: "_until"}}}, - "values": {{Name: "values", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Func: "null"}}}}}}}}, - "walk": {{Name: "walk", Args: []string{"f"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_walk", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}, Then: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Func: "_walk"}}}}}, Elif: []*IfElif{{Cond: &Query{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}, Then: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map_values", Args: []*Query{{Func: "_walk"}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "f"}}}}, Func: "_walk"}}}, - "while": {{Name: "while", Args: []string{"cond", "update"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_while", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "cond"}, Then: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "update"}, Op: OpPipe, Right: &Query{Func: "_while"}}}}}, Else: &Query{Func: "empty"}}}}}}, Func: "_while"}}}, - "with_entries": {{Name: "with_entries", Args: []string{"f"}, Body: &Query{Left: &Query{Func: "to_entries"}, Op: OpPipe, Right: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Func: "f"}}}}}, Op: OpPipe, Right: &Query{Func: "from_entries"}}}}}, + "unique_by": {{Name: "unique_by", Args: []string{"f"}, Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "_unique_by", Args: []*Query{{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Term: &Term{Type: TermTypeArray, Array: &Array{Query: &Query{Func: "f"}}}}}}}}}}}}}}, + "until": {{Name: "until", Args: []string{"cond", "next"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_until", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "cond"}, Then: &Query{Func: "."}, Else: &Query{Left: &Query{Func: "next"}, Op: OpPipe, Right: &Query{Func: "_until"}}}}}}}, Func: "_until"}}}, + "values": {{Name: "values", Body: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "select", Args: []*Query{{Left: &Query{Func: "."}, Op: OpNe, Right: &Query{Func: "null"}}}}}}}}, + "walk": {{Name: "walk", Args: []string{"f"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_walk", Body: &Query{Left: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "array"}}}}, Then: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Func: "_walk"}}}}}, Elif: []*IfElif{{Cond: &Query{Left: &Query{Func: "type"}, Op: OpEq, Right: &Query{Term: &Term{Type: TermTypeString, Str: &String{Str: "object"}}}}, Then: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map_values", Args: []*Query{{Func: "_walk"}}}}}}}}}}, Op: OpPipe, Right: &Query{Func: "f"}}}}, Func: "_walk"}}}, + "while": {{Name: "while", Args: []string{"cond", "update"}, Body: &Query{FuncDefs: []*FuncDef{{Name: "_while", Body: &Query{Term: &Term{Type: TermTypeIf, If: &If{Cond: &Query{Func: "cond"}, Then: &Query{Left: &Query{Func: "."}, Op: OpComma, Right: &Query{Term: &Term{Type: TermTypeQuery, Query: &Query{Left: &Query{Func: "update"}, Op: OpPipe, Right: &Query{Func: "_while"}}}}}, Else: &Query{Func: "empty"}}}}}}, Func: "_while"}}}, + "with_entries": {{Name: "with_entries", Args: []string{"f"}, Body: &Query{Left: &Query{Func: "to_entries"}, Op: OpPipe, Right: &Query{Left: &Query{Term: &Term{Type: TermTypeFunc, Func: &Func{Name: "map", Args: []*Query{{Func: "f"}}}}}, Op: OpPipe, Right: &Query{Func: "from_entries"}}}}}, } } diff --git a/vendor/github.com/json-iterator/go/iter_float.go b/vendor/github.com/json-iterator/go/iter_float.go index 8a3d8b6fb4..caf16feec8 100644 --- a/vendor/github.com/json-iterator/go/iter_float.go +++ b/vendor/github.com/json-iterator/go/iter_float.go @@ -66,7 +66,7 @@ func (iter *Iterator) ReadBigInt() (ret *big.Int) { return ret } -//ReadFloat32 read float32 +// ReadFloat32 read float32 func (iter *Iterator) ReadFloat32() (ret float32) { c := iter.nextToken() if c == '-' { diff --git a/vendor/github.com/json-iterator/go/iter_skip_sloppy.go b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go index 9303de41e4..3d993f2773 100644 --- a/vendor/github.com/json-iterator/go/iter_skip_sloppy.go +++ b/vendor/github.com/json-iterator/go/iter_skip_sloppy.go @@ -1,4 +1,5 @@ -//+build jsoniter_sloppy +//go:build jsoniter_sloppy +// +build jsoniter_sloppy package jsoniter diff --git a/vendor/github.com/json-iterator/go/iter_skip_strict.go b/vendor/github.com/json-iterator/go/iter_skip_strict.go index 6cf66d0438..f1ad6591bb 100644 --- a/vendor/github.com/json-iterator/go/iter_skip_strict.go +++ b/vendor/github.com/json-iterator/go/iter_skip_strict.go @@ -1,4 +1,5 @@ -//+build !jsoniter_sloppy +//go:build !jsoniter_sloppy +// +build !jsoniter_sloppy package jsoniter diff --git a/vendor/github.com/kisielk/errcheck/errcheck/embedded_walker.go b/vendor/github.com/kisielk/errcheck/errcheck/embedded_walker.go index 98f28e9a6b..06f67df926 100644 --- a/vendor/github.com/kisielk/errcheck/errcheck/embedded_walker.go +++ b/vendor/github.com/kisielk/errcheck/errcheck/embedded_walker.go @@ -18,16 +18,16 @@ import ( // // For example, say we have: // -// type Inner interface {Method()} -// type Middle interface {Inner} -// type Outer interface {Middle} -// type T struct {Outer} -// type U struct {T} -// type V struct {U} +// type Inner interface {Method()} +// type Middle interface {Inner} +// type Outer interface {Middle} +// type T struct {Outer} +// type U struct {T} +// type V struct {U} // // And then the selector: // -// V.Method +// V.Method // // We'll return [Outer, Middle, Inner] by first walking through the embedded structs // until we reach the Outer interface, then descending through the embedded interfaces diff --git a/vendor/github.com/kisielk/errcheck/errcheck/tags.go b/vendor/github.com/kisielk/errcheck/errcheck/tags.go index 7b423ca69c..e1ce1dbbec 100644 --- a/vendor/github.com/kisielk/errcheck/errcheck/tags.go +++ b/vendor/github.com/kisielk/errcheck/errcheck/tags.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package errcheck diff --git a/vendor/github.com/kisielk/errcheck/errcheck/tags_compat.go b/vendor/github.com/kisielk/errcheck/errcheck/tags_compat.go index 2f534f40a8..bc9e64203d 100644 --- a/vendor/github.com/kisielk/errcheck/errcheck/tags_compat.go +++ b/vendor/github.com/kisielk/errcheck/errcheck/tags_compat.go @@ -1,5 +1,5 @@ -// +build go1.11 -// +build !go1.13 +//go:build go1.11 && !go1.13 +// +build go1.11,!go1.13 package errcheck diff --git a/vendor/github.com/liggitt/tabwriter/tabwriter.go b/vendor/github.com/liggitt/tabwriter/tabwriter.go index fd3431fb03..4538af5d47 100644 --- a/vendor/github.com/liggitt/tabwriter/tabwriter.go +++ b/vendor/github.com/liggitt/tabwriter/tabwriter.go @@ -25,7 +25,6 @@ import ( // The text itself is stored in a separate buffer; cell only describes the // segment's size in bytes, its width in runes, and whether it's an htab // ('\t') terminated cell. -// type cell struct { size int // cell size in bytes width int // cell width in runes @@ -89,7 +88,6 @@ type cell struct { // The Writer must buffer input internally, because proper spacing // of one line may depend on the cells in future lines. Clients must // call Flush when done calling Write. -// type Writer struct { // configuration output io.Writer @@ -214,7 +212,6 @@ const ( // (for correct-looking results, tabwidth must correspond // to the tab width in the viewer displaying the result) // flags formatting control -// func (b *Writer) Init(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer { if minwidth < 0 || tabwidth < 0 || padding < 0 { panic("negative minwidth, tabwidth, or padding") @@ -357,7 +354,6 @@ func (b *Writer) writeLines(pos0 int, line0, line1 int) (pos int) { // is the buffer position corresponding to the beginning of line0. // Returns the buffer position corresponding to the beginning of // line1 and an error, if any. -// func (b *Writer) format(pos0 int, line0, line1 int) (pos int) { pos = pos0 column := len(b.widths) @@ -449,7 +445,6 @@ func (b *Writer) updateWidth() { // width one for formatting purposes. // // The value 0xff was chosen because it cannot appear in a valid UTF-8 sequence. -// const Escape = '\xff' // Start escaped mode. @@ -468,7 +463,6 @@ func (b *Writer) startEscape(ch byte) { // is assumed to be zero for formatting purposes; if it was an HTML entity, // its width is assumed to be one. In all other cases, the width is the // unicode width of the text. -// func (b *Writer) endEscape() { switch b.endChar { case Escape: @@ -486,7 +480,6 @@ func (b *Writer) endEscape() { // Terminate the current cell by adding it to the list of cells of the // current line. Returns the number of cells in that line. -// func (b *Writer) terminateCell(htab bool) int { b.cell.htab = htab line := &b.lines[len(b.lines)-1] @@ -552,7 +545,6 @@ var hbar = []byte("---\n") // Write writes buf to the writer b. // The only errors returned are ones encountered // while writing to the underlying output stream. -// func (b *Writer) Write(buf []byte) (n int, err error) { defer handlePanic(&err, "Write") @@ -631,7 +623,6 @@ func (b *Writer) Write(buf []byte) (n int, err error) { // NewWriter allocates and initializes a new tabwriter.Writer. // The parameters are the same as for the Init function. -// func NewWriter(output io.Writer, minwidth, tabwidth, padding int, padchar byte, flags uint) *Writer { return new(Writer).Init(output, minwidth, tabwidth, padding, padchar, flags) } diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go index e68108f868..39459d3250 100644 --- a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go +++ b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go @@ -2,8 +2,8 @@ // easyjson_nounsafe nor appengine build tag is set. See README notes // for more details. -//+build !easyjson_nounsafe -//+build !appengine +//go:build !easyjson_nounsafe && !appengine +// +build !easyjson_nounsafe,!appengine package jlexer diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go index 864d1be676..5c24365ccd 100644 --- a/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go +++ b/vendor/github.com/mailru/easyjson/jlexer/bytestostr_nounsafe.go @@ -1,7 +1,8 @@ // This file is included to the build if any of the buildtags below // are defined. Refer to README notes for more details. -//+build easyjson_nounsafe appengine +//go:build easyjson_nounsafe || appengine +// +build easyjson_nounsafe appengine package jlexer diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go index 8e3c99171b..367adab997 100644 --- a/vendor/github.com/mattn/go-isatty/isatty_windows.go +++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go @@ -42,7 +42,8 @@ func IsTerminal(fd uintptr) bool { // Check pipe name is used for cygwin/msys2 pty. // Cygwin/MSYS2 PTY has a name like: -// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master +// +// \{cygwin,msys}-XXXXXXXXXXXXXXXX-ptyN-{from,to}-master func isCygwinPipeName(name string) bool { token := strings.Split(name, "-") if len(token) < 5 { diff --git a/vendor/github.com/miekg/pkcs11/params.go b/vendor/github.com/miekg/pkcs11/params.go index 6d9ce96ae8..a874483f70 100644 --- a/vendor/github.com/miekg/pkcs11/params.go +++ b/vendor/github.com/miekg/pkcs11/params.go @@ -50,13 +50,12 @@ type GCMParams struct { // // Encrypt/Decrypt. As an example: // -// gcmParams := pkcs11.NewGCMParams(make([]byte, 12), nil, 128) -// p.ctx.EncryptInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_AES_GCM, gcmParams)}, -// aesObjHandle) -// ct, _ := p.ctx.Encrypt(session, pt) -// iv := gcmParams.IV() -// gcmParams.Free() -// +// gcmParams := pkcs11.NewGCMParams(make([]byte, 12), nil, 128) +// p.ctx.EncryptInit(session, []*pkcs11.Mechanism{pkcs11.NewMechanism(pkcs11.CKM_AES_GCM, gcmParams)}, +// aesObjHandle) +// ct, _ := p.ctx.Encrypt(session, pt) +// iv := gcmParams.IV() +// gcmParams.Free() func NewGCMParams(iv, aad []byte, tagSize int) *GCMParams { return &GCMParams{ iv: iv, diff --git a/vendor/github.com/mitchellh/hashstructure/hashstructure.go b/vendor/github.com/mitchellh/hashstructure/hashstructure.go index 89dd4d3ea8..b71924312d 100644 --- a/vendor/github.com/mitchellh/hashstructure/hashstructure.go +++ b/vendor/github.com/mitchellh/hashstructure/hashstructure.go @@ -58,29 +58,28 @@ type HashOptions struct { // // Notes on the value: // -// * Unexported fields on structs are ignored and do not affect the +// - Unexported fields on structs are ignored and do not affect the // hash value. // -// * Adding an exported field to a struct with the zero value will change +// - Adding an exported field to a struct with the zero value will change // the hash value. // // For structs, the hashing can be controlled using tags. For example: // -// struct { -// Name string -// UUID string `hash:"ignore"` -// } +// struct { +// Name string +// UUID string `hash:"ignore"` +// } // // The available tag values are: // -// * "ignore" or "-" - The field will be ignored and not affect the hash code. +// - "ignore" or "-" - The field will be ignored and not affect the hash code. // -// * "set" - The field will be treated as a set, where ordering doesn't -// affect the hash code. This only works for slices. -// -// * "string" - The field will be hashed as a string, only works when the -// field implements fmt.Stringer +// - "set" - The field will be treated as a set, where ordering doesn't +// affect the hash code. This only works for slices. // +// - "string" - The field will be hashed as a string, only works when the +// field implements fmt.Stringer func Hash(v interface{}, opts *HashOptions) (uint64, error) { // Create default options if opts == nil { diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go index 1efb22ac36..fadccc4ab8 100644 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ b/vendor/github.com/mitchellh/mapstructure/mapstructure.go @@ -9,84 +9,84 @@ // // The simplest function to start with is Decode. // -// Field Tags +// # Field Tags // // When decoding to a struct, mapstructure will use the field name by // default to perform the mapping. For example, if a struct has a field // "Username" then mapstructure will look for a key in the source value // of "username" (case insensitive). // -// type User struct { -// Username string -// } +// type User struct { +// Username string +// } // // You can change the behavior of mapstructure by using struct tags. // The default struct tag that mapstructure looks for is "mapstructure" // but you can customize it using DecoderConfig. // -// Renaming Fields +// # Renaming Fields // // To rename the key that mapstructure looks for, use the "mapstructure" // tag and set a value directly. For example, to change the "username" example // above to "user": // -// type User struct { -// Username string `mapstructure:"user"` -// } +// type User struct { +// Username string `mapstructure:"user"` +// } // -// Embedded Structs and Squashing +// # Embedded Structs and Squashing // // Embedded structs are treated as if they're another field with that name. // By default, the two structs below are equivalent when decoding with // mapstructure: // -// type Person struct { -// Name string -// } +// type Person struct { +// Name string +// } // -// type Friend struct { -// Person -// } +// type Friend struct { +// Person +// } // -// type Friend struct { -// Person Person -// } +// type Friend struct { +// Person Person +// } // // This would require an input that looks like below: // -// map[string]interface{}{ -// "person": map[string]interface{}{"name": "alice"}, -// } +// map[string]interface{}{ +// "person": map[string]interface{}{"name": "alice"}, +// } // // If your "person" value is NOT nested, then you can append ",squash" to // your tag value and mapstructure will treat it as if the embedded struct // were part of the struct directly. Example: // -// type Friend struct { -// Person `mapstructure:",squash"` -// } +// type Friend struct { +// Person `mapstructure:",squash"` +// } // // Now the following input would be accepted: // -// map[string]interface{}{ -// "name": "alice", -// } +// map[string]interface{}{ +// "name": "alice", +// } // // When decoding from a struct to a map, the squash tag squashes the struct // fields into a single map. Using the example structs from above: // -// Friend{Person: Person{Name: "alice"}} +// Friend{Person: Person{Name: "alice"}} // // Will be decoded into a map: // -// map[string]interface{}{ -// "name": "alice", -// } +// map[string]interface{}{ +// "name": "alice", +// } // // DecoderConfig has a field that changes the behavior of mapstructure // to always squash embedded structs. // -// Remainder Values +// # Remainder Values // // If there are any unmapped keys in the source value, mapstructure by // default will silently ignore them. You can error by setting ErrorUnused @@ -98,20 +98,20 @@ // probably be a "map[string]interface{}" or "map[interface{}]interface{}". // See example below: // -// type Friend struct { -// Name string -// Other map[string]interface{} `mapstructure:",remain"` -// } +// type Friend struct { +// Name string +// Other map[string]interface{} `mapstructure:",remain"` +// } // // Given the input below, Other would be populated with the other // values that weren't used (everything but "name"): // -// map[string]interface{}{ -// "name": "bob", -// "address": "123 Maple St.", -// } +// map[string]interface{}{ +// "name": "bob", +// "address": "123 Maple St.", +// } // -// Omit Empty Values +// # Omit Empty Values // // When decoding from a struct to any other value, you may use the // ",omitempty" suffix on your tag to omit that value if it equates to @@ -122,37 +122,37 @@ // field value is zero and a numeric type, the field is empty, and it won't // be encoded into the destination type. // -// type Source struct { -// Age int `mapstructure:",omitempty"` -// } +// type Source struct { +// Age int `mapstructure:",omitempty"` +// } // -// Unexported fields +// # Unexported fields // // Since unexported (private) struct fields cannot be set outside the package // where they are defined, the decoder will simply skip them. // // For this output type definition: // -// type Exported struct { -// private string // this unexported field will be skipped -// Public string -// } +// type Exported struct { +// private string // this unexported field will be skipped +// Public string +// } // // Using this map as input: // -// map[string]interface{}{ -// "private": "I will be ignored", -// "Public": "I made it through!", -// } +// map[string]interface{}{ +// "private": "I will be ignored", +// "Public": "I made it through!", +// } // // The following struct will be decoded: // -// type Exported struct { -// private: "" // field is left with an empty string (zero value) -// Public: "I made it through!" -// } +// type Exported struct { +// private: "" // field is left with an empty string (zero value) +// Public: "I made it through!" +// } // -// Other Configuration +// # Other Configuration // // mapstructure is highly configurable. See the DecoderConfig struct // for other features and options that are supported. diff --git a/vendor/github.com/modern-go/concurrent/go_above_19.go b/vendor/github.com/modern-go/concurrent/go_above_19.go index aeabf8c4f9..7db7019454 100644 --- a/vendor/github.com/modern-go/concurrent/go_above_19.go +++ b/vendor/github.com/modern-go/concurrent/go_above_19.go @@ -1,4 +1,5 @@ -//+build go1.9 +//go:build go1.9 +// +build go1.9 package concurrent diff --git a/vendor/github.com/modern-go/concurrent/go_below_19.go b/vendor/github.com/modern-go/concurrent/go_below_19.go index b9c8df7f41..64544f5b35 100644 --- a/vendor/github.com/modern-go/concurrent/go_below_19.go +++ b/vendor/github.com/modern-go/concurrent/go_below_19.go @@ -1,4 +1,5 @@ -//+build !go1.9 +//go:build !go1.9 +// +build !go1.9 package concurrent diff --git a/vendor/github.com/modern-go/concurrent/log.go b/vendor/github.com/modern-go/concurrent/log.go index 9756fcc75a..4899eed026 100644 --- a/vendor/github.com/modern-go/concurrent/log.go +++ b/vendor/github.com/modern-go/concurrent/log.go @@ -1,13 +1,13 @@ package concurrent import ( - "os" - "log" "io/ioutil" + "log" + "os" ) // ErrorLogger is used to print out error, can be set to writer other than stderr var ErrorLogger = log.New(os.Stderr, "", 0) // InfoLogger is used to print informational message, default to off -var InfoLogger = log.New(ioutil.Discard, "", 0) \ No newline at end of file +var InfoLogger = log.New(ioutil.Discard, "", 0) diff --git a/vendor/github.com/modern-go/concurrent/unbounded_executor.go b/vendor/github.com/modern-go/concurrent/unbounded_executor.go index 05a77dceb1..5ea18eb7bf 100644 --- a/vendor/github.com/modern-go/concurrent/unbounded_executor.go +++ b/vendor/github.com/modern-go/concurrent/unbounded_executor.go @@ -3,11 +3,11 @@ package concurrent import ( "context" "fmt" + "reflect" "runtime" "runtime/debug" "sync" "time" - "reflect" ) // HandlePanic logs goroutine panic by default diff --git a/vendor/github.com/modern-go/reflect2/go_above_118.go b/vendor/github.com/modern-go/reflect2/go_above_118.go index 2b4116f6c9..33c825f6d5 100644 --- a/vendor/github.com/modern-go/reflect2/go_above_118.go +++ b/vendor/github.com/modern-go/reflect2/go_above_118.go @@ -1,4 +1,5 @@ -//+build go1.18 +//go:build go1.18 +// +build go1.18 package reflect2 @@ -8,6 +9,7 @@ import ( // m escapes into the return value, but the caller of mapiterinit // doesn't let the return value escape. +// //go:noescape //go:linkname mapiterinit reflect.mapiterinit func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer, it *hiter) @@ -20,4 +22,4 @@ func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { pKeyRType: type2.pKeyRType, pElemRType: type2.pElemRType, } -} \ No newline at end of file +} diff --git a/vendor/github.com/modern-go/reflect2/go_above_19.go b/vendor/github.com/modern-go/reflect2/go_above_19.go index 974f7685e4..03ccb43c65 100644 --- a/vendor/github.com/modern-go/reflect2/go_above_19.go +++ b/vendor/github.com/modern-go/reflect2/go_above_19.go @@ -1,4 +1,5 @@ -//+build go1.9 +//go:build go1.9 +// +build go1.9 package reflect2 diff --git a/vendor/github.com/modern-go/reflect2/go_below_118.go b/vendor/github.com/modern-go/reflect2/go_below_118.go index 00003dbd7c..092ec5b5d2 100644 --- a/vendor/github.com/modern-go/reflect2/go_below_118.go +++ b/vendor/github.com/modern-go/reflect2/go_below_118.go @@ -1,4 +1,5 @@ -//+build !go1.18 +//go:build !go1.18 +// +build !go1.18 package reflect2 @@ -8,6 +9,7 @@ import ( // m escapes into the return value, but the caller of mapiterinit // doesn't let the return value escape. +// //go:noescape //go:linkname mapiterinit reflect.mapiterinit func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) (val *hiter) @@ -18,4 +20,4 @@ func (type2 *UnsafeMapType) UnsafeIterate(obj unsafe.Pointer) MapIterator { pKeyRType: type2.pKeyRType, pElemRType: type2.pElemRType, } -} \ No newline at end of file +} diff --git a/vendor/github.com/modern-go/reflect2/reflect2.go b/vendor/github.com/modern-go/reflect2/reflect2.go index c43c8b9d62..b0c281fcac 100644 --- a/vendor/github.com/modern-go/reflect2/reflect2.go +++ b/vendor/github.com/modern-go/reflect2/reflect2.go @@ -282,6 +282,7 @@ func likePtrType(typ reflect.Type) bool { // output depends on the input. noescape is inlined and currently // compiles down to zero instructions. // USE CAREFULLY! +// //go:nosplit func NoEscape(p unsafe.Pointer) unsafe.Pointer { x := uintptr(p) diff --git a/vendor/github.com/modern-go/reflect2/type_map.go b/vendor/github.com/modern-go/reflect2/type_map.go index 4b13c3155c..54c8498ef1 100644 --- a/vendor/github.com/modern-go/reflect2/type_map.go +++ b/vendor/github.com/modern-go/reflect2/type_map.go @@ -1,3 +1,4 @@ +//go:build !gccgo // +build !gccgo package reflect2 @@ -9,6 +10,7 @@ import ( ) // typelinks2 for 1.7 ~ +// //go:linkname typelinks2 reflect.typelinks func typelinks2() (sections []unsafe.Pointer, offset [][]int32) diff --git a/vendor/github.com/modern-go/reflect2/unsafe_link.go b/vendor/github.com/modern-go/reflect2/unsafe_link.go index b49f614efc..61849bb426 100644 --- a/vendor/github.com/modern-go/reflect2/unsafe_link.go +++ b/vendor/github.com/modern-go/reflect2/unsafe_link.go @@ -13,6 +13,7 @@ func unsafe_NewArray(rtype unsafe.Pointer, length int) unsafe.Pointer // typedslicecopy copies a slice of elemType values from src to dst, // returning the number of elements copied. +// //go:linkname typedslicecopy reflect.typedslicecopy //go:noescape func typedslicecopy(elemType unsafe.Pointer, dst, src sliceHeader) int diff --git a/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go b/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go index 1b727721e1..fcaee0f049 100644 --- a/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go +++ b/vendor/github.com/mxk/go-flowrate/flowrate/flowrate.go @@ -38,10 +38,10 @@ type Monitor struct { // weight of each sample in the exponential moving average (EMA) calculation. // The exact formulas are: // -// sampleTime = currentTime - prevSampleTime -// sampleRate = byteCount / sampleTime -// weight = 1 - exp(-sampleTime/windowSize) -// newRate = weight*sampleRate + (1-weight)*oldRate +// sampleTime = currentTime - prevSampleTime +// sampleRate = byteCount / sampleTime +// weight = 1 - exp(-sampleTime/windowSize) +// newRate = weight*sampleRate + (1-weight)*oldRate // // The default values for sampleRate and windowSize (if <= 0) are 100ms and 1s, // respectively. diff --git a/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go index 778bfd7c7c..5576890540 100644 --- a/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go +++ b/vendor/github.com/onsi/ginkgo/v2/formatter/colorable_others.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows /* diff --git a/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go b/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go index 419589b48c..cae532574b 100644 --- a/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go +++ b/vendor/github.com/onsi/ginkgo/v2/ginkgo/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "os" "github.com/onsi/ginkgo/v2/ginkgo/build" "github.com/onsi/ginkgo/v2/ginkgo/command" "github.com/onsi/ginkgo/v2/ginkgo/generators" @@ -12,6 +11,7 @@ import ( "github.com/onsi/ginkgo/v2/ginkgo/unfocus" "github.com/onsi/ginkgo/v2/ginkgo/watch" "github.com/onsi/ginkgo/v2/types" + "os" ) var program command.Program diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go index 8b7a9ceabf..cf05af7ab7 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson.go @@ -83,7 +83,7 @@ func goJSONActionFromSpecState(state types.SpecState) GoJSONAction { type gojsonReport struct { o types.Report // Extra calculated fields - goPkg string + goPkg string elapsed float64 } @@ -109,8 +109,8 @@ type gojsonSpecReport struct { o types.SpecReport // extra calculated fields testName string - elapsed float64 - action GoJSONAction + elapsed float64 + action GoJSONAction } func newSpecReport(in types.SpecReport) *gojsonSpecReport { @@ -141,18 +141,18 @@ func suitePathToPkg(dir string) (string, error) { } func createTestName(spec types.SpecReport) string { - name := fmt.Sprintf("[%s]", spec.LeafNodeType) - if spec.FullText() != "" { - name = name + " " + spec.FullText() - } - labels := spec.Labels() - if len(labels) > 0 { - name = name + " [" + strings.Join(labels, ", ") + "]" - } - semVerConstraints := spec.SemVerConstraints() - if len(semVerConstraints) > 0 { - name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" - } - name = strings.TrimSpace(name) - return name + name := fmt.Sprintf("[%s]", spec.LeafNodeType) + if spec.FullText() != "" { + name = name + " " + spec.FullText() + } + labels := spec.Labels() + if len(labels) > 0 { + name = name + " [" + strings.Join(labels, ", ") + "]" + } + semVerConstraints := spec.SemVerConstraints() + if len(semVerConstraints) > 0 { + name = name + " [" + strings.Join(semVerConstraints, ", ") + "]" + } + name = strings.TrimSpace(name) + return name } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_event_writer.go b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_event_writer.go index ec5311d069..7760a0c3a8 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_event_writer.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_event_writer.go @@ -1,14 +1,14 @@ package reporters type GoJSONEventWriter struct { - enc encoder + enc encoder specSystemErrFn specSystemExtractFn specSystemOutFn specSystemExtractFn } func NewGoJSONEventWriter(enc encoder, errFn specSystemExtractFn, outFn specSystemExtractFn) *GoJSONEventWriter { return &GoJSONEventWriter{ - enc: enc, + enc: enc, specSystemErrFn: errFn, specSystemOutFn: outFn, } diff --git a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_reporter.go b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_reporter.go index 633e49b88d..6eb9a8b299 100644 --- a/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_reporter.go +++ b/vendor/github.com/onsi/ginkgo/v2/internal/reporters/gojson_reporter.go @@ -8,7 +8,7 @@ type GoJSONReporter struct { ev *GoJSONEventWriter } -type specSystemExtractFn func (spec types.SpecReport) string +type specSystemExtractFn func(spec types.SpecReport) string func NewGoJSONReporter(enc encoder, errFn specSystemExtractFn, outFn specSystemExtractFn) *GoJSONReporter { return &GoJSONReporter{ diff --git a/vendor/github.com/opencontainers/go-digest/digest.go b/vendor/github.com/opencontainers/go-digest/digest.go index 518b5e7154..465996ce6c 100644 --- a/vendor/github.com/opencontainers/go-digest/digest.go +++ b/vendor/github.com/opencontainers/go-digest/digest.go @@ -30,7 +30,7 @@ import ( // // The following is an example of the contents of Digest types: // -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // This allows to abstract the digest behind this type and work only in those // terms. diff --git a/vendor/github.com/opencontainers/go-digest/doc.go b/vendor/github.com/opencontainers/go-digest/doc.go index 83d3a936ca..e2dd44f466 100644 --- a/vendor/github.com/opencontainers/go-digest/doc.go +++ b/vendor/github.com/opencontainers/go-digest/doc.go @@ -19,16 +19,16 @@ // More importantly, it provides tools and wrappers to work with // hash.Hash-based digests with little effort. // -// Basics +// # Basics // // The format of a digest is simply a string with two parts, dubbed the // "algorithm" and the "digest", separated by a colon: // -// : +// : // // An example of a sha256 digest representation follows: // -// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc +// sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc // // The "algorithm" portion defines both the hashing algorithm used to calculate // the digest and the encoding of the resulting digest, which defaults to "hex" @@ -42,7 +42,7 @@ // obtained, comparisons are cheap, quick and simple to express with the // standard equality operator. // -// Verification +// # Verification // // The main benefit of using the Digest type is simple verification against a // given digest. The Verifier interface, modeled after the stdlib hash.Hash @@ -50,7 +50,7 @@ // writing is complete, calling the Verifier.Verified method will indicate // whether or not the stream of bytes matches the target digest. // -// Missing Features +// # Missing Features // // In addition to the above, we intend to add the following features to this // package: @@ -58,5 +58,4 @@ // 1. A Digester type that supports write sink digest calculation. // // 2. Suspend and resume of ongoing digest calculations to support efficient digest verification in the registry. -// package digest diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go index 00d32306d7..0d01253ae1 100644 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go +++ b/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go @@ -21,14 +21,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{ // AddToScheme adds all types of this clientset into the given scheme. This allows composition // of clientsets, like in: // -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) +// import ( +// "k8s.io/client-go/kubernetes" +// clientsetscheme "k8s.io/client-go/kubernetes/scheme" +// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" +// ) // -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) +// kclientset, _ := kubernetes.NewForConfig(c) +// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) // // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types // correctly. diff --git a/vendor/github.com/operator-framework/api/crds/zz_defs.go b/vendor/github.com/operator-framework/api/crds/zz_defs.go index 06bb23be58..afc6aeb122 100644 --- a/vendor/github.com/operator-framework/api/crds/zz_defs.go +++ b/vendor/github.com/operator-framework/api/crds/zz_defs.go @@ -1,6 +1,6 @@ // Code generated by go-bindata. (@generated) DO NOT EDIT. -//Package crds generated by go-bindata.// sources: +// Package crds generated by go-bindata.// sources: // operators.coreos.com_catalogsources.yaml // operators.coreos.com_clusterserviceversions.yaml // operators.coreos.com_installplans.yaml diff --git a/vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient/client.go b/vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient/client.go index 30593acfa2..8fecc1f1cf 100644 --- a/vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient/client.go +++ b/vendor/github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient/client.go @@ -1,4 +1,4 @@ -//go:generate go run github.com/golang/mock/mockgen -source client.go -destination operatorclientmocks/mock_client.go -package operatorclientmocks +//go:generate go run go.uber.org/mock/mockgen -source client.go -destination operatorclientmocks/mock_client.go -package operatorclientmocks package operatorclient import ( diff --git a/vendor/github.com/pkg/errors/errors.go b/vendor/github.com/pkg/errors/errors.go index 161aea2582..5d90dd4cc1 100644 --- a/vendor/github.com/pkg/errors/errors.go +++ b/vendor/github.com/pkg/errors/errors.go @@ -2,89 +2,89 @@ // // The traditional error handling idiom in Go is roughly akin to // -// if err != nil { -// return err -// } +// if err != nil { +// return err +// } // // which when applied recursively up the call stack results in error reports // without context or debugging information. The errors package allows // programmers to add context to the failure path in their code in a way // that does not destroy the original value of the error. // -// Adding context to an error +// # Adding context to an error // // The errors.Wrap function returns a new error that adds context to the // original error by recording a stack trace at the point Wrap is called, // together with the supplied message. For example // -// _, err := ioutil.ReadAll(r) -// if err != nil { -// return errors.Wrap(err, "read failed") -// } +// _, err := ioutil.ReadAll(r) +// if err != nil { +// return errors.Wrap(err, "read failed") +// } // // If additional control is required, the errors.WithStack and // errors.WithMessage functions destructure errors.Wrap into its component // operations: annotating an error with a stack trace and with a message, // respectively. // -// Retrieving the cause of an error +// # Retrieving the cause of an error // // Using errors.Wrap constructs a stack of errors, adding context to the // preceding error. Depending on the nature of the error it may be necessary // to reverse the operation of errors.Wrap to retrieve the original error // for inspection. Any error value which implements this interface // -// type causer interface { -// Cause() error -// } +// type causer interface { +// Cause() error +// } // // can be inspected by errors.Cause. errors.Cause will recursively retrieve // the topmost error that does not implement causer, which is assumed to be // the original cause. For example: // -// switch err := errors.Cause(err).(type) { -// case *MyError: -// // handle specifically -// default: -// // unknown error -// } +// switch err := errors.Cause(err).(type) { +// case *MyError: +// // handle specifically +// default: +// // unknown error +// } // // Although the causer interface is not exported by this package, it is // considered a part of its stable public interface. // -// Formatted printing of errors +// # Formatted printing of errors // // All error values returned from this package implement fmt.Formatter and can // be formatted by the fmt package. The following verbs are supported: // -// %s print the error. If the error has a Cause it will be -// printed recursively. -// %v see %s -// %+v extended format. Each Frame of the error's StackTrace will -// be printed in detail. +// %s print the error. If the error has a Cause it will be +// printed recursively. +// %v see %s +// %+v extended format. Each Frame of the error's StackTrace will +// be printed in detail. // -// Retrieving the stack trace of an error or wrapper +// # Retrieving the stack trace of an error or wrapper // // New, Errorf, Wrap, and Wrapf record a stack trace at the point they are // invoked. This information can be retrieved with the following interface: // -// type stackTracer interface { -// StackTrace() errors.StackTrace -// } +// type stackTracer interface { +// StackTrace() errors.StackTrace +// } // // The returned errors.StackTrace type is defined as // -// type StackTrace []Frame +// type StackTrace []Frame // // The Frame type represents a call site in the stack trace. Frame supports // the fmt.Formatter interface that can be used for printing information about // the stack trace of this error. For example: // -// if err, ok := err.(stackTracer); ok { -// for _, f := range err.StackTrace() { -// fmt.Printf("%+s:%d\n", f, f) -// } -// } +// if err, ok := err.(stackTracer); ok { +// for _, f := range err.StackTrace() { +// fmt.Printf("%+s:%d\n", f, f) +// } +// } // // Although the stackTracer interface is not exported by this package, it is // considered a part of its stable public interface. @@ -265,9 +265,9 @@ func (w *withMessage) Format(s fmt.State, verb rune) { // An error value has a cause if it implements the following // interface: // -// type causer interface { -// Cause() error -// } +// type causer interface { +// Cause() error +// } // // If the error does not implement Cause, the original error will // be returned. If the error is nil, nil will be returned without further diff --git a/vendor/github.com/pkg/errors/go113.go b/vendor/github.com/pkg/errors/go113.go index be0d10d0c7..2c83c72453 100644 --- a/vendor/github.com/pkg/errors/go113.go +++ b/vendor/github.com/pkg/errors/go113.go @@ -1,3 +1,4 @@ +//go:build go1.13 // +build go1.13 package errors diff --git a/vendor/github.com/pkg/errors/stack.go b/vendor/github.com/pkg/errors/stack.go index 779a8348fb..82784d7003 100644 --- a/vendor/github.com/pkg/errors/stack.go +++ b/vendor/github.com/pkg/errors/stack.go @@ -51,16 +51,16 @@ func (f Frame) name() string { // Format formats the frame according to the fmt.Formatter interface. // -// %s source file -// %d source line -// %n function name -// %v equivalent to %s:%d +// %s source file +// %d source line +// %n function name +// %v equivalent to %s:%d // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+s function name and path of source file relative to the compile time -// GOPATH separated by \n\t (\n\t) -// %+v equivalent to %+s:%d +// %+s function name and path of source file relative to the compile time +// GOPATH separated by \n\t (\n\t) +// %+v equivalent to %+s:%d func (f Frame) Format(s fmt.State, verb rune) { switch verb { case 's': @@ -98,12 +98,12 @@ type StackTrace []Frame // Format formats the stack of Frames according to the fmt.Formatter interface. // -// %s lists source files for each Frame in the stack -// %v lists the source file and line number for each Frame in the stack +// %s lists source files for each Frame in the stack +// %v lists the source file and line number for each Frame in the stack // // Format accepts flags that alter the printing of some verbs, as follows: // -// %+v Prints filename, function, and line number for each Frame in the stack. +// %+v Prints filename, function, and line number for each Frame in the stack. func (st StackTrace) Format(s fmt.State, verb rune) { switch verb { case 'v': diff --git a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go index 003e99fadb..2a73737af6 100644 --- a/vendor/github.com/pmezard/go-difflib/difflib/difflib.go +++ b/vendor/github.com/pmezard/go-difflib/difflib/difflib.go @@ -199,12 +199,15 @@ func (m *SequenceMatcher) isBJunk(s string) bool { // If IsJunk is not defined: // // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi +// +// alo <= i <= i+k <= ahi +// blo <= j <= j+k <= bhi +// // and for all (i',j',k') meeting those conditions, -// k >= k' -// i <= i' -// and if i == i', j <= j' +// +// k >= k' +// i <= i' +// and if i == i', j <= j' // // In other words, of all maximal matching blocks, return one that // starts earliest in a, and of all those maximal matching blocks that diff --git a/vendor/github.com/russross/blackfriday/v2/doc.go b/vendor/github.com/russross/blackfriday/v2/doc.go index 57ff152a05..2a5cc5b678 100644 --- a/vendor/github.com/russross/blackfriday/v2/doc.go +++ b/vendor/github.com/russross/blackfriday/v2/doc.go @@ -16,7 +16,7 @@ // If you're interested in calling Blackfriday from command line, see // https://github.com/russross/blackfriday-tool. // -// Sanitized Anchor Names +// # Sanitized Anchor Names // // Blackfriday includes an algorithm for creating sanitized anchor names // corresponding to a given input text. This algorithm is used to create diff --git a/vendor/github.com/russross/blackfriday/v2/inline.go b/vendor/github.com/russross/blackfriday/v2/inline.go index d45bd94172..e13d425720 100644 --- a/vendor/github.com/russross/blackfriday/v2/inline.go +++ b/vendor/github.com/russross/blackfriday/v2/inline.go @@ -735,7 +735,9 @@ func linkEndsWithEntity(data []byte, linkEnd int) bool { } // hasPrefixCaseInsensitive is a custom implementation of -// strings.HasPrefix(strings.ToLower(s), prefix) +// +// strings.HasPrefix(strings.ToLower(s), prefix) +// // we rolled our own because ToLower pulls in a huge machinery of lowercasing // anything from Unicode and that's very slow. Since this func will only be // used on ASCII protocol prefixes, we can take shortcuts. diff --git a/vendor/github.com/russross/blackfriday/v2/markdown.go b/vendor/github.com/russross/blackfriday/v2/markdown.go index 58d2e4538c..382db9e9d2 100644 --- a/vendor/github.com/russross/blackfriday/v2/markdown.go +++ b/vendor/github.com/russross/blackfriday/v2/markdown.go @@ -345,8 +345,8 @@ func WithNoExtensions() Option { // In Markdown, the link reference syntax can be made to resolve a link to // a reference instead of an inline URL, in one of the following ways: // -// * [link text][refid] -// * [refid][] +// - [link text][refid] +// - [refid][] // // Usually, the refid is defined at the bottom of the Markdown document. If // this override function is provided, the refid is passed to the override @@ -363,7 +363,9 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // block of markdown-encoded text. // // The simplest invocation of Run takes one argument, input: -// output := Run(input) +// +// output := Run(input) +// // This will parse the input with CommonExtensions enabled and render it with // the default HTMLRenderer (with CommonHTMLFlags). // @@ -371,13 +373,15 @@ func WithRefOverride(o ReferenceOverrideFunc) Option { // type does not contain exported fields, you can not use it directly. Instead, // use the With* functions. For example, this will call the most basic // functionality, with no extensions: -// output := Run(input, WithNoExtensions()) +// +// output := Run(input, WithNoExtensions()) // // You can use any number of With* arguments, even contradicting ones. They // will be applied in order of appearance and the latter will override the // former: -// output := Run(input, WithNoExtensions(), WithExtensions(exts), -// WithRenderer(yourRenderer)) +// +// output := Run(input, WithNoExtensions(), WithExtensions(exts), +// WithRenderer(yourRenderer)) func Run(input []byte, opts ...Option) []byte { r := NewHTMLRenderer(HTMLRendererParameters{ Flags: CommonHTMLFlags, @@ -491,35 +495,35 @@ func (p *Markdown) parseRefsToAST() { // // Consider this markdown with reference-style links: // -// [link][ref] +// [link][ref] // -// [ref]: /url/ "tooltip title" +// [ref]: /url/ "tooltip title" // // It will be ultimately converted to this HTML: // -//

link

+//

link

// // And a reference structure will be populated as follows: // -// p.refs["ref"] = &reference{ -// link: "/url/", -// title: "tooltip title", -// } +// p.refs["ref"] = &reference{ +// link: "/url/", +// title: "tooltip title", +// } // // Alternatively, reference can contain information about a footnote. Consider // this markdown: // -// Text needing a footnote.[^a] +// Text needing a footnote.[^a] // -// [^a]: This is the note +// [^a]: This is the note // // A reference structure will be populated as follows: // -// p.refs["a"] = &reference{ -// link: "a", -// title: "This is the note", -// noteID: , -// } +// p.refs["a"] = &reference{ +// link: "a", +// title: "This is the note", +// noteID: , +// } // // TODO: As you can see, it begs for splitting into two dedicated structures // for refs and for footnotes. diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go index da67aba06d..51392be8f6 100644 --- a/vendor/github.com/sirupsen/logrus/doc.go +++ b/vendor/github.com/sirupsen/logrus/doc.go @@ -1,25 +1,25 @@ /* Package logrus is a structured logger for Go, completely API compatible with the standard library logger. - The simplest way to use Logrus is simply the package-level exported logger: - package main + package main - import ( - log "github.com/sirupsen/logrus" - ) + import ( + log "github.com/sirupsen/logrus" + ) - func main() { - log.WithFields(log.Fields{ - "animal": "walrus", - "number": 1, - "size": 10, - }).Info("A walrus appears") - } + func main() { + log.WithFields(log.Fields{ + "animal": "walrus", + "number": 1, + "size": 10, + }).Info("A walrus appears") + } Output: - time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 + + time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10 For a full guide visit https://github.com/sirupsen/logrus */ diff --git a/vendor/github.com/sirupsen/logrus/formatter.go b/vendor/github.com/sirupsen/logrus/formatter.go index 408883773e..8c76155154 100644 --- a/vendor/github.com/sirupsen/logrus/formatter.go +++ b/vendor/github.com/sirupsen/logrus/formatter.go @@ -30,12 +30,12 @@ type Formatter interface { // This is to not silently overwrite `time`, `msg`, `func` and `level` fields when // dumping it. If this code wasn't there doing: // -// logrus.WithField("level", 1).Info("hello") +// logrus.WithField("level", 1).Info("hello") // // Would just silently drop the user provided level. Instead with this code // it'll logged as: // -// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} +// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."} // // It's not exported because it's still using Data in an opinionated way. It's to // avoid code duplication between the two default formatters. diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go index 5ff0aef6d3..df059412e9 100644 --- a/vendor/github.com/sirupsen/logrus/logger.go +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -76,12 +76,12 @@ func (mw *MutexWrap) Disable() { // `Out` and `Hooks` directly on the default logger instance. You can also just // instantiate your own: // -// var log = &logrus.Logger{ -// Out: os.Stderr, -// Formatter: new(logrus.TextFormatter), -// Hooks: make(logrus.LevelHooks), -// Level: logrus.DebugLevel, -// } +// var log = &logrus.Logger{ +// Out: os.Stderr, +// Formatter: new(logrus.TextFormatter), +// Hooks: make(logrus.LevelHooks), +// Level: logrus.DebugLevel, +// } // // It's recommended to make this a global instance called `log`. func New() *Logger { @@ -347,9 +347,9 @@ func (logger *Logger) Exit(code int) { logger.ExitFunc(code) } -//When file is opened with appending mode, it's safe to -//write concurrently to a file (within 4k message on Linux). -//In these cases user can choose to disable the lock. +// When file is opened with appending mode, it's safe to +// write concurrently to a file (within 4k message on Linux). +// In these cases user can choose to disable the lock. func (logger *Logger) SetNoLock() { logger.mu.Disable() } diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go index 2403de9819..45de3e2b67 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go @@ -1,3 +1,4 @@ +//go:build appengine // +build appengine package logrus diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go index 499789984d..e3fa38b710 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go @@ -1,3 +1,4 @@ +//go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && !js // +build darwin dragonfly freebsd netbsd openbsd // +build !js diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go index ebdae3ec62..9e951f1b42 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_js.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_js.go @@ -1,3 +1,4 @@ +//go:build js // +build js package logrus diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go b/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go index 97af92c68e..04232da191 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go @@ -1,3 +1,4 @@ +//go:build js || nacl || plan9 // +build js nacl plan9 package logrus diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go index 3293fb3caa..1b4a99e325 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go @@ -1,3 +1,4 @@ +//go:build !appengine && !js && !windows && !nacl && !plan9 // +build !appengine,!js,!windows,!nacl,!plan9 package logrus diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go index 04748b8515..f3154b17fc 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go @@ -1,3 +1,4 @@ +//go:build (linux || aix || zos) && !js // +build linux aix zos // +build !js diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go index 2879eb50ea..893c62410c 100644 --- a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go +++ b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go @@ -1,3 +1,4 @@ +//go:build !appengine && !js && windows // +build !appengine,!js,windows package logrus diff --git a/vendor/github.com/smallstep/pkcs7/ber.go b/vendor/github.com/smallstep/pkcs7/ber.go index 52333215de..7f1aa2d320 100644 --- a/vendor/github.com/smallstep/pkcs7/ber.go +++ b/vendor/github.com/smallstep/pkcs7/ber.go @@ -101,12 +101,12 @@ func lengthLength(i int) (numBytes int) { // added to 0x80. The length is encoded in big endian encoding follow after // // Examples: -// length | byte 1 | bytes n -// 0 | 0x00 | - -// 120 | 0x78 | - -// 200 | 0x81 | 0xC8 -// 500 | 0x82 | 0x01 0xF4 // +// length | byte 1 | bytes n +// 0 | 0x00 | - +// 120 | 0x78 | - +// 200 | 0x81 | 0xC8 +// 500 | 0x82 | 0x01 0xF4 func encodeLength(out *bytes.Buffer, length int) (err error) { if length >= 128 { l := lengthLength(length) diff --git a/vendor/github.com/spf13/pflag/golangflag.go b/vendor/github.com/spf13/pflag/golangflag.go index e62eab5381..20594384a0 100644 --- a/vendor/github.com/spf13/pflag/golangflag.go +++ b/vendor/github.com/spf13/pflag/golangflag.go @@ -158,4 +158,3 @@ func ParseSkippedFlags(osArgs []string, goFlagSet *goflag.FlagSet) error { } return goFlagSet.Parse(skippedFlags) } - diff --git a/vendor/github.com/spf13/pflag/string_slice.go b/vendor/github.com/spf13/pflag/string_slice.go index 3cb2e69dba..d421887e86 100644 --- a/vendor/github.com/spf13/pflag/string_slice.go +++ b/vendor/github.com/spf13/pflag/string_slice.go @@ -98,9 +98,12 @@ func (f *FlagSet) GetStringSlice(name string) ([]string, error) { // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func (f *FlagSet) StringSliceVar(p *[]string, name string, value []string, usage string) { f.VarP(newStringSliceValue(value, p), name, "", usage) } @@ -114,9 +117,12 @@ func (f *FlagSet) StringSliceVarP(p *[]string, name, shorthand string, value []s // The argument p points to a []string variable in which to store the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func StringSliceVar(p *[]string, name string, value []string, usage string) { CommandLine.VarP(newStringSliceValue(value, p), name, "", usage) } @@ -130,9 +136,12 @@ func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func (f *FlagSet) StringSlice(name string, value []string, usage string) *[]string { p := []string{} f.StringSliceVarP(&p, name, "", value, usage) @@ -150,9 +159,12 @@ func (f *FlagSet) StringSliceP(name, shorthand string, value []string, usage str // The return value is the address of a []string variable that stores the value of the flag. // Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly. // For example: -// --ss="v1,v2" --ss="v3" +// +// --ss="v1,v2" --ss="v3" +// // will result in -// []string{"v1", "v2", "v3"} +// +// []string{"v1", "v2", "v3"} func StringSlice(name string, value []string, usage string) *[]string { return CommandLine.StringSliceP(name, "", value, usage) } diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/common.go b/vendor/github.com/vbatts/tar-split/archive/tar/common.go index dee9e47e4a..a7a6539a1b 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/common.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/common.go @@ -221,9 +221,11 @@ func (s sparseEntry) endOffset() int64 { return s.Offset + s.Length } // that the file has no data in it, which is rather odd. // // As an example, if the underlying raw file contains the 10-byte data: +// // var compactFile = "abcdefgh" // // And the sparse map has the following entries: +// // var spd sparseDatas = []sparseEntry{ // {Offset: 2, Length: 5}, // Data fragment for 2..6 // {Offset: 18, Length: 3}, // Data fragment for 18..20 @@ -235,6 +237,7 @@ func (s sparseEntry) endOffset() int64 { return s.Offset + s.Length } // } // // Then the content of the resulting sparse file with a Header.Size of 25 is: +// // var sparseFile = "\x00"*2 + "abcde" + "\x00"*11 + "fgh" + "\x00"*4 type ( sparseDatas []sparseEntry @@ -293,9 +296,9 @@ func alignSparseEntries(src []sparseEntry, size int64) []sparseEntry { // The input must have been already validated. // // This function mutates src and returns a normalized map where: -// * adjacent fragments are coalesced together -// * only the last fragment may be empty -// * the endOffset of the last fragment is the total size +// - adjacent fragments are coalesced together +// - only the last fragment may be empty +// - the endOffset of the last fragment is the total size func invertSparseEntries(src []sparseEntry, size int64) []sparseEntry { dst := src[:0] var pre sparseEntry diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go b/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go index cf9cc79c59..0eb8e2980a 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime1.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux || dragonfly || openbsd || solaris // +build linux dragonfly openbsd solaris package tar diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go b/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go index 6f17dbe307..5a9a35cbb4 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/stat_actime2.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build darwin || freebsd || netbsd // +build darwin freebsd netbsd package tar diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go b/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go index 868105f338..9ff215944d 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/stat_unix.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build linux || darwin || dragonfly || freebsd || openbsd || netbsd || solaris // +build linux darwin dragonfly freebsd openbsd netbsd solaris package tar diff --git a/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go b/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go index d144485a49..2073f7e8a9 100644 --- a/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go +++ b/vendor/github.com/vbatts/tar-split/archive/tar/strconv.go @@ -244,7 +244,7 @@ func formatPAXTime(ts time.Time) (s string) { if secs < 0 { sign = "-" // Remember sign secs = -(secs + 1) // Add a second to secs - nsecs = -(nsecs - 1E9) // Take that second away from nsecs + nsecs = -(nsecs - 1e9) // Take that second away from nsecs } return strings.TrimRight(fmt.Sprintf("%s%d.%09d", sign, secs, nsecs), "0") } @@ -306,6 +306,7 @@ func formatPAXRecord(k, v string) (string, error) { // validPAXRecord reports whether the key-value pair is valid where each // record is formatted as: +// // "%d %s=%s\n" % (size, key, value) // // Keys and values should be UTF-8, but the number of bad writers out there diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go index 60f3df0db5..ce59106c06 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/attribute_group.go @@ -1063,7 +1063,8 @@ func AWSExtendedRequestID(val string) attribute.KeyValue { // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked // ARN as provided on the `Context` passed to the function ( // `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` -// applicable). +// +// applicable). func AWSLambdaInvokedARN(val string) attribute.KeyValue { return AWSLambdaInvokedARNKey.String(val) } @@ -2037,7 +2038,8 @@ func CloudRegion(val string) attribute.KeyValue { // "cloud.resource_id" semantic conventions. It represents the cloud // provider-specific native identifier of the monitored cloud resource (e.g. an // [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name] -// on GCP). +// +// on GCP). // // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id @@ -12330,4 +12332,4 @@ func WebEngineName(val string) attribute.KeyValue { // engine. func WebEngineVersion(val string) attribute.KeyValue { return WebEngineVersionKey.String(val) -} \ No newline at end of file +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go index fe6beb91dd..acd41968b6 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.30.0/metric.go @@ -6,1745 +6,1745 @@ package semconv // import "go.opentelemetry.io/otel/semconv/v1.30.0" const ( - // AzureCosmosDBClientActiveInstanceCount is the metric conforming to the - // "azure.cosmosdb.client.active_instance.count" semantic conventions. It - // represents the number of active client instances. - // Instrument: updowncounter - // Unit: {instance} - // Stability: development - AzureCosmosDBClientActiveInstanceCountName = "azure.cosmosdb.client.active_instance.count" - AzureCosmosDBClientActiveInstanceCountUnit = "{instance}" - AzureCosmosDBClientActiveInstanceCountDescription = "Number of active client instances" - // AzureCosmosDBClientOperationRequestCharge is the metric conforming to the - // "azure.cosmosdb.client.operation.request_charge" semantic conventions. It - // represents the [Request units] consumed by the operation. - // - // [Request units]: https://learn.microsoft.com/azure/cosmos-db/request-units - // Instrument: histogram - // Unit: {request_unit} - // Stability: development - AzureCosmosDBClientOperationRequestChargeName = "azure.cosmosdb.client.operation.request_charge" - AzureCosmosDBClientOperationRequestChargeUnit = "{request_unit}" - AzureCosmosDBClientOperationRequestChargeDescription = "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation" - // CICDPipelineRunActive is the metric conforming to the - // "cicd.pipeline.run.active" semantic conventions. It represents the number of - // pipeline runs currently active in the system by state. - // Instrument: updowncounter - // Unit: {run} - // Stability: development - CICDPipelineRunActiveName = "cicd.pipeline.run.active" - CICDPipelineRunActiveUnit = "{run}" - CICDPipelineRunActiveDescription = "The number of pipeline runs currently active in the system by state." - // CICDPipelineRunDuration is the metric conforming to the - // "cicd.pipeline.run.duration" semantic conventions. It represents the - // duration of a pipeline run grouped by pipeline, state and result. - // Instrument: histogram - // Unit: s - // Stability: development - CICDPipelineRunDurationName = "cicd.pipeline.run.duration" - CICDPipelineRunDurationUnit = "s" - CICDPipelineRunDurationDescription = "Duration of a pipeline run grouped by pipeline, state and result." - // CICDPipelineRunErrors is the metric conforming to the - // "cicd.pipeline.run.errors" semantic conventions. It represents the number of - // errors encountered in pipeline runs (eg. compile, test failures). - // Instrument: counter - // Unit: {error} - // Stability: development - CICDPipelineRunErrorsName = "cicd.pipeline.run.errors" - CICDPipelineRunErrorsUnit = "{error}" - CICDPipelineRunErrorsDescription = "The number of errors encountered in pipeline runs (eg. compile, test failures)." - // CICDSystemErrors is the metric conforming to the "cicd.system.errors" - // semantic conventions. It represents the number of errors in a component of - // the CICD system (eg. controller, scheduler, agent). - // Instrument: counter - // Unit: {error} - // Stability: development - CICDSystemErrorsName = "cicd.system.errors" - CICDSystemErrorsUnit = "{error}" - CICDSystemErrorsDescription = "The number of errors in a component of the CICD system (eg. controller, scheduler, agent)." - // CICDWorkerCount is the metric conforming to the "cicd.worker.count" semantic - // conventions. It represents the number of workers on the CICD system by - // state. - // Instrument: updowncounter - // Unit: {count} - // Stability: development - CICDWorkerCountName = "cicd.worker.count" - CICDWorkerCountUnit = "{count}" - CICDWorkerCountDescription = "The number of workers on the CICD system by state." - // ContainerCPUTime is the metric conforming to the "container.cpu.time" - // semantic conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: development - ContainerCPUTimeName = "container.cpu.time" - ContainerCPUTimeUnit = "s" - ContainerCPUTimeDescription = "Total CPU time consumed" - // ContainerCPUUsage is the metric conforming to the "container.cpu.usage" - // semantic conventions. It represents the container's CPU usage, measured in - // cpus. Range from 0 to the number of allocatable CPUs. - // Instrument: gauge - // Unit: {cpu} - // Stability: development - ContainerCPUUsageName = "container.cpu.usage" - ContainerCPUUsageUnit = "{cpu}" - ContainerCPUUsageDescription = "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" - // ContainerDiskIo is the metric conforming to the "container.disk.io" semantic - // conventions. It represents the disk bytes for the container. - // Instrument: counter - // Unit: By - // Stability: development - ContainerDiskIoName = "container.disk.io" - ContainerDiskIoUnit = "By" - ContainerDiskIoDescription = "Disk bytes for the container." - // ContainerMemoryUsage is the metric conforming to the - // "container.memory.usage" semantic conventions. It represents the memory - // usage of the container. - // Instrument: counter - // Unit: By - // Stability: development - ContainerMemoryUsageName = "container.memory.usage" - ContainerMemoryUsageUnit = "By" - ContainerMemoryUsageDescription = "Memory usage of the container." - // ContainerNetworkIo is the metric conforming to the "container.network.io" - // semantic conventions. It represents the network bytes for the container. - // Instrument: counter - // Unit: By - // Stability: development - ContainerNetworkIoName = "container.network.io" - ContainerNetworkIoUnit = "By" - ContainerNetworkIoDescription = "Network bytes for the container." - // ContainerUptime is the metric conforming to the "container.uptime" semantic - // conventions. It represents the time the container has been running. - // Instrument: gauge - // Unit: s - // Stability: development - ContainerUptimeName = "container.uptime" - ContainerUptimeUnit = "s" - ContainerUptimeDescription = "The time the container has been running" - // DBClientConnectionCount is the metric conforming to the - // "db.client.connection.count" semantic conventions. It represents the number - // of connections that are currently in state described by the `state` - // attribute. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionCountName = "db.client.connection.count" - DBClientConnectionCountUnit = "{connection}" - DBClientConnectionCountDescription = "The number of connections that are currently in state described by the `state` attribute" - // DBClientConnectionCreateTime is the metric conforming to the - // "db.client.connection.create_time" semantic conventions. It represents the - // time it took to create a new connection. - // Instrument: histogram - // Unit: s - // Stability: development - DBClientConnectionCreateTimeName = "db.client.connection.create_time" - DBClientConnectionCreateTimeUnit = "s" - DBClientConnectionCreateTimeDescription = "The time it took to create a new connection" - // DBClientConnectionIdleMax is the metric conforming to the - // "db.client.connection.idle.max" semantic conventions. It represents the - // maximum number of idle open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionIdleMaxName = "db.client.connection.idle.max" - DBClientConnectionIdleMaxUnit = "{connection}" - DBClientConnectionIdleMaxDescription = "The maximum number of idle open connections allowed" - // DBClientConnectionIdleMin is the metric conforming to the - // "db.client.connection.idle.min" semantic conventions. It represents the - // minimum number of idle open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionIdleMinName = "db.client.connection.idle.min" - DBClientConnectionIdleMinUnit = "{connection}" - DBClientConnectionIdleMinDescription = "The minimum number of idle open connections allowed" - // DBClientConnectionMax is the metric conforming to the - // "db.client.connection.max" semantic conventions. It represents the maximum - // number of open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - DBClientConnectionMaxName = "db.client.connection.max" - DBClientConnectionMaxUnit = "{connection}" - DBClientConnectionMaxDescription = "The maximum number of open connections allowed" - // DBClientConnectionPendingRequests is the metric conforming to the - // "db.client.connection.pending_requests" semantic conventions. It represents - // the number of current pending requests for an open connection. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - DBClientConnectionPendingRequestsName = "db.client.connection.pending_requests" - DBClientConnectionPendingRequestsUnit = "{request}" - DBClientConnectionPendingRequestsDescription = "The number of current pending requests for an open connection" - // DBClientConnectionTimeouts is the metric conforming to the - // "db.client.connection.timeouts" semantic conventions. It represents the - // number of connection timeouts that have occurred trying to obtain a - // connection from the pool. - // Instrument: counter - // Unit: {timeout} - // Stability: development - DBClientConnectionTimeoutsName = "db.client.connection.timeouts" - DBClientConnectionTimeoutsUnit = "{timeout}" - DBClientConnectionTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" - // DBClientConnectionUseTime is the metric conforming to the - // "db.client.connection.use_time" semantic conventions. It represents the time - // between borrowing a connection and returning it to the pool. - // Instrument: histogram - // Unit: s - // Stability: development - DBClientConnectionUseTimeName = "db.client.connection.use_time" - DBClientConnectionUseTimeUnit = "s" - DBClientConnectionUseTimeDescription = "The time between borrowing a connection and returning it to the pool" - // DBClientConnectionWaitTime is the metric conforming to the - // "db.client.connection.wait_time" semantic conventions. It represents the - // time it took to obtain an open connection from the pool. - // Instrument: histogram - // Unit: s - // Stability: development - DBClientConnectionWaitTimeName = "db.client.connection.wait_time" - DBClientConnectionWaitTimeUnit = "s" - DBClientConnectionWaitTimeDescription = "The time it took to obtain an open connection from the pool" - // DBClientConnectionsCreateTime is the metric conforming to the - // "db.client.connections.create_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.create_time` instead. Note: the unit - // also changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: development - // Deprecated: Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. - DBClientConnectionsCreateTimeName = "db.client.connections.create_time" - DBClientConnectionsCreateTimeUnit = "ms" - DBClientConnectionsCreateTimeDescription = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`." - // DBClientConnectionsIdleMax is the metric conforming to the - // "db.client.connections.idle.max" semantic conventions. It represents the - // deprecated, use `db.client.connection.idle.max` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.idle.max`. - DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" - DBClientConnectionsIdleMaxUnit = "{connection}" - DBClientConnectionsIdleMaxDescription = "Deprecated, use `db.client.connection.idle.max` instead." - // DBClientConnectionsIdleMin is the metric conforming to the - // "db.client.connections.idle.min" semantic conventions. It represents the - // deprecated, use `db.client.connection.idle.min` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.idle.min`. - DBClientConnectionsIdleMinName = "db.client.connections.idle.min" - DBClientConnectionsIdleMinUnit = "{connection}" - DBClientConnectionsIdleMinDescription = "Deprecated, use `db.client.connection.idle.min` instead." - // DBClientConnectionsMax is the metric conforming to the - // "db.client.connections.max" semantic conventions. It represents the - // deprecated, use `db.client.connection.max` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.max`. - DBClientConnectionsMaxName = "db.client.connections.max" - DBClientConnectionsMaxUnit = "{connection}" - DBClientConnectionsMaxDescription = "Deprecated, use `db.client.connection.max` instead." - // DBClientConnectionsPendingRequests is the metric conforming to the - // "db.client.connections.pending_requests" semantic conventions. It represents - // the deprecated, use `db.client.connection.pending_requests` instead. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - // Deprecated: Replaced by `db.client.connection.pending_requests`. - DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" - DBClientConnectionsPendingRequestsUnit = "{request}" - DBClientConnectionsPendingRequestsDescription = "Deprecated, use `db.client.connection.pending_requests` instead." - // DBClientConnectionsTimeouts is the metric conforming to the - // "db.client.connections.timeouts" semantic conventions. It represents the - // deprecated, use `db.client.connection.timeouts` instead. - // Instrument: counter - // Unit: {timeout} - // Stability: development - // Deprecated: Replaced by `db.client.connection.timeouts`. - DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" - DBClientConnectionsTimeoutsUnit = "{timeout}" - DBClientConnectionsTimeoutsDescription = "Deprecated, use `db.client.connection.timeouts` instead." - // DBClientConnectionsUsage is the metric conforming to the - // "db.client.connections.usage" semantic conventions. It represents the - // deprecated, use `db.client.connection.count` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // Deprecated: Replaced by `db.client.connection.count`. - DBClientConnectionsUsageName = "db.client.connections.usage" - DBClientConnectionsUsageUnit = "{connection}" - DBClientConnectionsUsageDescription = "Deprecated, use `db.client.connection.count` instead." - // DBClientConnectionsUseTime is the metric conforming to the - // "db.client.connections.use_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.use_time` instead. Note: the unit also - // changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: development - // Deprecated: Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. - DBClientConnectionsUseTimeName = "db.client.connections.use_time" - DBClientConnectionsUseTimeUnit = "ms" - DBClientConnectionsUseTimeDescription = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`." - // DBClientConnectionsWaitTime is the metric conforming to the - // "db.client.connections.wait_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.wait_time` instead. Note: the unit - // also changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: development - // Deprecated: Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. - DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" - DBClientConnectionsWaitTimeUnit = "ms" - DBClientConnectionsWaitTimeDescription = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`." - // DBClientCosmosDBActiveInstanceCount is the metric conforming to the - // "db.client.cosmosdb.active_instance.count" semantic conventions. It - // represents the deprecated, use `azure.cosmosdb.client.active_instance.count` - // instead. - // Instrument: updowncounter - // Unit: {instance} - // Stability: development - // Deprecated: Replaced by `azure.cosmosdb.client.active_instance.count`. - DBClientCosmosDBActiveInstanceCountName = "db.client.cosmosdb.active_instance.count" - DBClientCosmosDBActiveInstanceCountUnit = "{instance}" - DBClientCosmosDBActiveInstanceCountDescription = "Deprecated, use `azure.cosmosdb.client.active_instance.count` instead." - // DBClientCosmosDBOperationRequestCharge is the metric conforming to the - // "db.client.cosmosdb.operation.request_charge" semantic conventions. It - // represents the deprecated, use - // `azure.cosmosdb.client.operation.request_charge` instead. - // Instrument: histogram - // Unit: {request_unit} - // Stability: development - // Deprecated: Replaced by `azure.cosmosdb.client.operation.request_charge`. - DBClientCosmosDBOperationRequestChargeName = "db.client.cosmosdb.operation.request_charge" - DBClientCosmosDBOperationRequestChargeUnit = "{request_unit}" - DBClientCosmosDBOperationRequestChargeDescription = "Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead." - // DBClientOperationDuration is the metric conforming to the - // "db.client.operation.duration" semantic conventions. It represents the - // duration of database client operations. - // Instrument: histogram - // Unit: s - // Stability: release_candidate - DBClientOperationDurationName = "db.client.operation.duration" - DBClientOperationDurationUnit = "s" - DBClientOperationDurationDescription = "Duration of database client operations." - // DBClientResponseReturnedRows is the metric conforming to the - // "db.client.response.returned_rows" semantic conventions. It represents the - // actual number of records returned by the database operation. - // Instrument: histogram - // Unit: {row} - // Stability: development - DBClientResponseReturnedRowsName = "db.client.response.returned_rows" - DBClientResponseReturnedRowsUnit = "{row}" - DBClientResponseReturnedRowsDescription = "The actual number of records returned by the database operation." - // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" - // semantic conventions. It represents the measures the time taken to perform a - // DNS lookup. - // Instrument: histogram - // Unit: s - // Stability: development - DNSLookupDurationName = "dns.lookup.duration" - DNSLookupDurationUnit = "s" - DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." - // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic - // conventions. It represents the number of invocation cold starts. - // Instrument: counter - // Unit: {coldstart} - // Stability: development - FaaSColdstartsName = "faas.coldstarts" - FaaSColdstartsUnit = "{coldstart}" - FaaSColdstartsDescription = "Number of invocation cold starts" - // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic - // conventions. It represents the distribution of CPU usage per invocation. - // Instrument: histogram - // Unit: s - // Stability: development - FaaSCPUUsageName = "faas.cpu_usage" - FaaSCPUUsageUnit = "s" - FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" - // FaaSErrors is the metric conforming to the "faas.errors" semantic - // conventions. It represents the number of invocation errors. - // Instrument: counter - // Unit: {error} - // Stability: development - FaaSErrorsName = "faas.errors" - FaaSErrorsUnit = "{error}" - FaaSErrorsDescription = "Number of invocation errors" - // FaaSInitDuration is the metric conforming to the "faas.init_duration" - // semantic conventions. It represents the measures the duration of the - // function's initialization, such as a cold start. - // Instrument: histogram - // Unit: s - // Stability: development - FaaSInitDurationName = "faas.init_duration" - FaaSInitDurationUnit = "s" - FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" - // FaaSInvocations is the metric conforming to the "faas.invocations" semantic - // conventions. It represents the number of successful invocations. - // Instrument: counter - // Unit: {invocation} - // Stability: development - FaaSInvocationsName = "faas.invocations" - FaaSInvocationsUnit = "{invocation}" - FaaSInvocationsDescription = "Number of successful invocations" - // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" - // semantic conventions. It represents the measures the duration of the - // function's logic execution. - // Instrument: histogram - // Unit: s - // Stability: development - FaaSInvokeDurationName = "faas.invoke_duration" - FaaSInvokeDurationUnit = "s" - FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" - // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic - // conventions. It represents the distribution of max memory usage per - // invocation. - // Instrument: histogram - // Unit: By - // Stability: development - FaaSMemUsageName = "faas.mem_usage" - FaaSMemUsageUnit = "By" - FaaSMemUsageDescription = "Distribution of max memory usage per invocation" - // FaaSNetIo is the metric conforming to the "faas.net_io" semantic - // conventions. It represents the distribution of net I/O usage per invocation. - // Instrument: histogram - // Unit: By - // Stability: development - FaaSNetIoName = "faas.net_io" - FaaSNetIoUnit = "By" - FaaSNetIoDescription = "Distribution of net I/O usage per invocation" - // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic - // conventions. It represents the number of invocation timeouts. - // Instrument: counter - // Unit: {timeout} - // Stability: development - FaaSTimeoutsName = "faas.timeouts" - FaaSTimeoutsUnit = "{timeout}" - FaaSTimeoutsDescription = "Number of invocation timeouts" - // GenAIClientOperationDuration is the metric conforming to the - // "gen_ai.client.operation.duration" semantic conventions. It represents the - // genAI operation duration. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIClientOperationDurationName = "gen_ai.client.operation.duration" - GenAIClientOperationDurationUnit = "s" - GenAIClientOperationDurationDescription = "GenAI operation duration" - // GenAIClientTokenUsage is the metric conforming to the - // "gen_ai.client.token.usage" semantic conventions. It represents the measures - // number of input and output tokens used. - // Instrument: histogram - // Unit: {token} - // Stability: development - GenAIClientTokenUsageName = "gen_ai.client.token.usage" - GenAIClientTokenUsageUnit = "{token}" - GenAIClientTokenUsageDescription = "Measures number of input and output tokens used" - // GenAIServerRequestDuration is the metric conforming to the - // "gen_ai.server.request.duration" semantic conventions. It represents the - // generative AI server request duration such as time-to-last byte or last - // output token. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIServerRequestDurationName = "gen_ai.server.request.duration" - GenAIServerRequestDurationUnit = "s" - GenAIServerRequestDurationDescription = "Generative AI server request duration such as time-to-last byte or last output token" - // GenAIServerTimePerOutputToken is the metric conforming to the - // "gen_ai.server.time_per_output_token" semantic conventions. It represents - // the time per output token generated after the first token for successful - // responses. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIServerTimePerOutputTokenName = "gen_ai.server.time_per_output_token" - GenAIServerTimePerOutputTokenUnit = "s" - GenAIServerTimePerOutputTokenDescription = "Time per output token generated after the first token for successful responses" - // GenAIServerTimeToFirstToken is the metric conforming to the - // "gen_ai.server.time_to_first_token" semantic conventions. It represents the - // time to generate first token for successful responses. - // Instrument: histogram - // Unit: s - // Stability: development - GenAIServerTimeToFirstTokenName = "gen_ai.server.time_to_first_token" - GenAIServerTimeToFirstTokenUnit = "s" - GenAIServerTimeToFirstTokenDescription = "Time to generate first token for successful responses" - // GoConfigGogc is the metric conforming to the "go.config.gogc" semantic - // conventions. It represents the heap size target percentage configured by the - // user, otherwise 100. - // Instrument: updowncounter - // Unit: % - // Stability: development - GoConfigGogcName = "go.config.gogc" - GoConfigGogcUnit = "%" - GoConfigGogcDescription = "Heap size target percentage configured by the user, otherwise 100." - // GoGoroutineCount is the metric conforming to the "go.goroutine.count" - // semantic conventions. It represents the count of live goroutines. - // Instrument: updowncounter - // Unit: {goroutine} - // Stability: development - GoGoroutineCountName = "go.goroutine.count" - GoGoroutineCountUnit = "{goroutine}" - GoGoroutineCountDescription = "Count of live goroutines." - // GoMemoryAllocated is the metric conforming to the "go.memory.allocated" - // semantic conventions. It represents the memory allocated to the heap by the - // application. - // Instrument: counter - // Unit: By - // Stability: development - GoMemoryAllocatedName = "go.memory.allocated" - GoMemoryAllocatedUnit = "By" - GoMemoryAllocatedDescription = "Memory allocated to the heap by the application." - // GoMemoryAllocations is the metric conforming to the "go.memory.allocations" - // semantic conventions. It represents the count of allocations to the heap by - // the application. - // Instrument: counter - // Unit: {allocation} - // Stability: development - GoMemoryAllocationsName = "go.memory.allocations" - GoMemoryAllocationsUnit = "{allocation}" - GoMemoryAllocationsDescription = "Count of allocations to the heap by the application." - // GoMemoryGCGoal is the metric conforming to the "go.memory.gc.goal" semantic - // conventions. It represents the heap size target for the end of the GC cycle. - // Instrument: updowncounter - // Unit: By - // Stability: development - GoMemoryGCGoalName = "go.memory.gc.goal" - GoMemoryGCGoalUnit = "By" - GoMemoryGCGoalDescription = "Heap size target for the end of the GC cycle." - // GoMemoryLimit is the metric conforming to the "go.memory.limit" semantic - // conventions. It represents the go runtime memory limit configured by the - // user, if a limit exists. - // Instrument: updowncounter - // Unit: By - // Stability: development - GoMemoryLimitName = "go.memory.limit" - GoMemoryLimitUnit = "By" - GoMemoryLimitDescription = "Go runtime memory limit configured by the user, if a limit exists." - // GoMemoryUsed is the metric conforming to the "go.memory.used" semantic - // conventions. It represents the memory used by the Go runtime. - // Instrument: updowncounter - // Unit: By - // Stability: development - GoMemoryUsedName = "go.memory.used" - GoMemoryUsedUnit = "By" - GoMemoryUsedDescription = "Memory used by the Go runtime." - // GoProcessorLimit is the metric conforming to the "go.processor.limit" - // semantic conventions. It represents the number of OS threads that can - // execute user-level Go code simultaneously. - // Instrument: updowncounter - // Unit: {thread} - // Stability: development - GoProcessorLimitName = "go.processor.limit" - GoProcessorLimitUnit = "{thread}" - GoProcessorLimitDescription = "The number of OS threads that can execute user-level Go code simultaneously." - // GoScheduleDuration is the metric conforming to the "go.schedule.duration" - // semantic conventions. It represents the time goroutines have spent in the - // scheduler in a runnable state before actually running. - // Instrument: histogram - // Unit: s - // Stability: development - GoScheduleDurationName = "go.schedule.duration" - GoScheduleDurationUnit = "s" - GoScheduleDurationDescription = "The time goroutines have spent in the scheduler in a runnable state before actually running." - // HTTPClientActiveRequests is the metric conforming to the - // "http.client.active_requests" semantic conventions. It represents the number - // of active HTTP requests. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - HTTPClientActiveRequestsName = "http.client.active_requests" - HTTPClientActiveRequestsUnit = "{request}" - HTTPClientActiveRequestsDescription = "Number of active HTTP requests." - // HTTPClientConnectionDuration is the metric conforming to the - // "http.client.connection.duration" semantic conventions. It represents the - // duration of the successfully established outbound HTTP connections. - // Instrument: histogram - // Unit: s - // Stability: development - HTTPClientConnectionDurationName = "http.client.connection.duration" - HTTPClientConnectionDurationUnit = "s" - HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." - // HTTPClientOpenConnections is the metric conforming to the - // "http.client.open_connections" semantic conventions. It represents the - // number of outbound HTTP connections that are currently active or idle on the - // client. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - HTTPClientOpenConnectionsName = "http.client.open_connections" - HTTPClientOpenConnectionsUnit = "{connection}" - HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." - // HTTPClientRequestBodySize is the metric conforming to the - // "http.client.request.body.size" semantic conventions. It represents the size - // of HTTP client request bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPClientRequestBodySizeName = "http.client.request.body.size" - HTTPClientRequestBodySizeUnit = "By" - HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." - // HTTPClientRequestDuration is the metric conforming to the - // "http.client.request.duration" semantic conventions. It represents the - // duration of HTTP client requests. - // Instrument: histogram - // Unit: s - // Stability: stable - HTTPClientRequestDurationName = "http.client.request.duration" - HTTPClientRequestDurationUnit = "s" - HTTPClientRequestDurationDescription = "Duration of HTTP client requests." - // HTTPClientResponseBodySize is the metric conforming to the - // "http.client.response.body.size" semantic conventions. It represents the - // size of HTTP client response bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPClientResponseBodySizeName = "http.client.response.body.size" - HTTPClientResponseBodySizeUnit = "By" - HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." - // HTTPServerActiveRequests is the metric conforming to the - // "http.server.active_requests" semantic conventions. It represents the number - // of active HTTP server requests. - // Instrument: updowncounter - // Unit: {request} - // Stability: development - HTTPServerActiveRequestsName = "http.server.active_requests" - HTTPServerActiveRequestsUnit = "{request}" - HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." - // HTTPServerRequestBodySize is the metric conforming to the - // "http.server.request.body.size" semantic conventions. It represents the size - // of HTTP server request bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPServerRequestBodySizeName = "http.server.request.body.size" - HTTPServerRequestBodySizeUnit = "By" - HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." - // HTTPServerRequestDuration is the metric conforming to the - // "http.server.request.duration" semantic conventions. It represents the - // duration of HTTP server requests. - // Instrument: histogram - // Unit: s - // Stability: stable - HTTPServerRequestDurationName = "http.server.request.duration" - HTTPServerRequestDurationUnit = "s" - HTTPServerRequestDurationDescription = "Duration of HTTP server requests." - // HTTPServerResponseBodySize is the metric conforming to the - // "http.server.response.body.size" semantic conventions. It represents the - // size of HTTP server response bodies. - // Instrument: histogram - // Unit: By - // Stability: development - HTTPServerResponseBodySizeName = "http.server.response.body.size" - HTTPServerResponseBodySizeUnit = "By" - HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." - // HwEnergy is the metric conforming to the "hw.energy" semantic conventions. - // It represents the energy consumed by the component. - // Instrument: counter - // Unit: J - // Stability: development - HwEnergyName = "hw.energy" - HwEnergyUnit = "J" - HwEnergyDescription = "Energy consumed by the component" - // HwErrors is the metric conforming to the "hw.errors" semantic conventions. - // It represents the number of errors encountered by the component. - // Instrument: counter - // Unit: {error} - // Stability: development - HwErrorsName = "hw.errors" - HwErrorsUnit = "{error}" - HwErrorsDescription = "Number of errors encountered by the component" - // HwPower is the metric conforming to the "hw.power" semantic conventions. It - // represents the instantaneous power consumed by the component. - // Instrument: gauge - // Unit: W - // Stability: development - HwPowerName = "hw.power" - HwPowerUnit = "W" - HwPowerDescription = "Instantaneous power consumed by the component" - // HwStatus is the metric conforming to the "hw.status" semantic conventions. - // It represents the operational status: `1` (true) or `0` (false) for each of - // the possible states. - // Instrument: updowncounter - // Unit: 1 - // Stability: development - HwStatusName = "hw.status" - HwStatusUnit = "1" - HwStatusDescription = "Operational status: `1` (true) or `0` (false) for each of the possible states" - // K8SCronJobActiveJobs is the metric conforming to the - // "k8s.cronjob.active_jobs" semantic conventions. It represents the number of - // actively running jobs for a cronjob. - // Instrument: updowncounter - // Unit: {job} - // Stability: development - K8SCronJobActiveJobsName = "k8s.cronjob.active_jobs" - K8SCronJobActiveJobsUnit = "{job}" - K8SCronJobActiveJobsDescription = "The number of actively running jobs for a cronjob" - // K8SDaemonSetCurrentScheduledNodes is the metric conforming to the - // "k8s.daemonset.current_scheduled_nodes" semantic conventions. It represents - // the number of nodes that are running at least 1 daemon pod and are supposed - // to run the daemon pod. - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetCurrentScheduledNodesName = "k8s.daemonset.current_scheduled_nodes" - K8SDaemonSetCurrentScheduledNodesUnit = "{node}" - K8SDaemonSetCurrentScheduledNodesDescription = "Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod" - // K8SDaemonSetDesiredScheduledNodes is the metric conforming to the - // "k8s.daemonset.desired_scheduled_nodes" semantic conventions. It represents - // the number of nodes that should be running the daemon pod (including nodes - // currently running the daemon pod). - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetDesiredScheduledNodesName = "k8s.daemonset.desired_scheduled_nodes" - K8SDaemonSetDesiredScheduledNodesUnit = "{node}" - K8SDaemonSetDesiredScheduledNodesDescription = "Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod)" - // K8SDaemonSetMisscheduledNodes is the metric conforming to the - // "k8s.daemonset.misscheduled_nodes" semantic conventions. It represents the - // number of nodes that are running the daemon pod, but are not supposed to run - // the daemon pod. - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetMisscheduledNodesName = "k8s.daemonset.misscheduled_nodes" - K8SDaemonSetMisscheduledNodesUnit = "{node}" - K8SDaemonSetMisscheduledNodesDescription = "Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod" - // K8SDaemonSetReadyNodes is the metric conforming to the - // "k8s.daemonset.ready_nodes" semantic conventions. It represents the number - // of nodes that should be running the daemon pod and have one or more of the - // daemon pod running and ready. - // Instrument: updowncounter - // Unit: {node} - // Stability: development - K8SDaemonSetReadyNodesName = "k8s.daemonset.ready_nodes" - K8SDaemonSetReadyNodesUnit = "{node}" - K8SDaemonSetReadyNodesDescription = "Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready" - // K8SDeploymentAvailablePods is the metric conforming to the - // "k8s.deployment.available_pods" semantic conventions. It represents the - // total number of available replica pods (ready for at least minReadySeconds) - // targeted by this deployment. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SDeploymentAvailablePodsName = "k8s.deployment.available_pods" - K8SDeploymentAvailablePodsUnit = "{pod}" - K8SDeploymentAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment" - // K8SDeploymentDesiredPods is the metric conforming to the - // "k8s.deployment.desired_pods" semantic conventions. It represents the number - // of desired replica pods in this deployment. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SDeploymentDesiredPodsName = "k8s.deployment.desired_pods" - K8SDeploymentDesiredPodsUnit = "{pod}" - K8SDeploymentDesiredPodsDescription = "Number of desired replica pods in this deployment" - // K8SHpaCurrentPods is the metric conforming to the "k8s.hpa.current_pods" - // semantic conventions. It represents the current number of replica pods - // managed by this horizontal pod autoscaler, as last seen by the autoscaler. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaCurrentPodsName = "k8s.hpa.current_pods" - K8SHpaCurrentPodsUnit = "{pod}" - K8SHpaCurrentPodsDescription = "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler" - // K8SHpaDesiredPods is the metric conforming to the "k8s.hpa.desired_pods" - // semantic conventions. It represents the desired number of replica pods - // managed by this horizontal pod autoscaler, as last calculated by the - // autoscaler. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaDesiredPodsName = "k8s.hpa.desired_pods" - K8SHpaDesiredPodsUnit = "{pod}" - K8SHpaDesiredPodsDescription = "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler" - // K8SHpaMaxPods is the metric conforming to the "k8s.hpa.max_pods" semantic - // conventions. It represents the upper limit for the number of replica pods to - // which the autoscaler can scale up. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaMaxPodsName = "k8s.hpa.max_pods" - K8SHpaMaxPodsUnit = "{pod}" - K8SHpaMaxPodsDescription = "The upper limit for the number of replica pods to which the autoscaler can scale up" - // K8SHpaMinPods is the metric conforming to the "k8s.hpa.min_pods" semantic - // conventions. It represents the lower limit for the number of replica pods to - // which the autoscaler can scale down. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SHpaMinPodsName = "k8s.hpa.min_pods" - K8SHpaMinPodsUnit = "{pod}" - K8SHpaMinPodsDescription = "The lower limit for the number of replica pods to which the autoscaler can scale down" - // K8SJobActivePods is the metric conforming to the "k8s.job.active_pods" - // semantic conventions. It represents the number of pending and actively - // running pods for a job. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobActivePodsName = "k8s.job.active_pods" - K8SJobActivePodsUnit = "{pod}" - K8SJobActivePodsDescription = "The number of pending and actively running pods for a job" - // K8SJobDesiredSuccessfulPods is the metric conforming to the - // "k8s.job.desired_successful_pods" semantic conventions. It represents the - // desired number of successfully finished pods the job should be run with. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobDesiredSuccessfulPodsName = "k8s.job.desired_successful_pods" - K8SJobDesiredSuccessfulPodsUnit = "{pod}" - K8SJobDesiredSuccessfulPodsDescription = "The desired number of successfully finished pods the job should be run with" - // K8SJobFailedPods is the metric conforming to the "k8s.job.failed_pods" - // semantic conventions. It represents the number of pods which reached phase - // Failed for a job. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobFailedPodsName = "k8s.job.failed_pods" - K8SJobFailedPodsUnit = "{pod}" - K8SJobFailedPodsDescription = "The number of pods which reached phase Failed for a job" - // K8SJobMaxParallelPods is the metric conforming to the - // "k8s.job.max_parallel_pods" semantic conventions. It represents the max - // desired number of pods the job should run at any given time. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobMaxParallelPodsName = "k8s.job.max_parallel_pods" - K8SJobMaxParallelPodsUnit = "{pod}" - K8SJobMaxParallelPodsDescription = "The max desired number of pods the job should run at any given time" - // K8SJobSuccessfulPods is the metric conforming to the - // "k8s.job.successful_pods" semantic conventions. It represents the number of - // pods which reached phase Succeeded for a job. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SJobSuccessfulPodsName = "k8s.job.successful_pods" - K8SJobSuccessfulPodsUnit = "{pod}" - K8SJobSuccessfulPodsDescription = "The number of pods which reached phase Succeeded for a job" - // K8SNamespacePhase is the metric conforming to the "k8s.namespace.phase" - // semantic conventions. It represents the describes number of K8s namespaces - // that are currently in a given phase. - // Instrument: updowncounter - // Unit: {namespace} - // Stability: development - K8SNamespacePhaseName = "k8s.namespace.phase" - K8SNamespacePhaseUnit = "{namespace}" - K8SNamespacePhaseDescription = "Describes number of K8s namespaces that are currently in a given phase." - // K8SNodeCPUTime is the metric conforming to the "k8s.node.cpu.time" semantic - // conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: development - K8SNodeCPUTimeName = "k8s.node.cpu.time" - K8SNodeCPUTimeUnit = "s" - K8SNodeCPUTimeDescription = "Total CPU time consumed" - // K8SNodeCPUUsage is the metric conforming to the "k8s.node.cpu.usage" - // semantic conventions. It represents the node's CPU usage, measured in cpus. - // Range from 0 to the number of allocatable CPUs. - // Instrument: gauge - // Unit: {cpu} - // Stability: development - K8SNodeCPUUsageName = "k8s.node.cpu.usage" - K8SNodeCPUUsageUnit = "{cpu}" - K8SNodeCPUUsageDescription = "Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" - // K8SNodeMemoryUsage is the metric conforming to the "k8s.node.memory.usage" - // semantic conventions. It represents the memory usage of the Node. - // Instrument: gauge - // Unit: By - // Stability: development - K8SNodeMemoryUsageName = "k8s.node.memory.usage" - K8SNodeMemoryUsageUnit = "By" - K8SNodeMemoryUsageDescription = "Memory usage of the Node" - // K8SNodeNetworkErrors is the metric conforming to the - // "k8s.node.network.errors" semantic conventions. It represents the node - // network errors. - // Instrument: counter - // Unit: {error} - // Stability: development - K8SNodeNetworkErrorsName = "k8s.node.network.errors" - K8SNodeNetworkErrorsUnit = "{error}" - K8SNodeNetworkErrorsDescription = "Node network errors" - // K8SNodeNetworkIo is the metric conforming to the "k8s.node.network.io" - // semantic conventions. It represents the network bytes for the Node. - // Instrument: counter - // Unit: By - // Stability: development - K8SNodeNetworkIoName = "k8s.node.network.io" - K8SNodeNetworkIoUnit = "By" - K8SNodeNetworkIoDescription = "Network bytes for the Node" - // K8SNodeUptime is the metric conforming to the "k8s.node.uptime" semantic - // conventions. It represents the time the Node has been running. - // Instrument: gauge - // Unit: s - // Stability: development - K8SNodeUptimeName = "k8s.node.uptime" - K8SNodeUptimeUnit = "s" - K8SNodeUptimeDescription = "The time the Node has been running" - // K8SPodCPUTime is the metric conforming to the "k8s.pod.cpu.time" semantic - // conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: development - K8SPodCPUTimeName = "k8s.pod.cpu.time" - K8SPodCPUTimeUnit = "s" - K8SPodCPUTimeDescription = "Total CPU time consumed" - // K8SPodCPUUsage is the metric conforming to the "k8s.pod.cpu.usage" semantic - // conventions. It represents the pod's CPU usage, measured in cpus. Range from - // 0 to the number of allocatable CPUs. - // Instrument: gauge - // Unit: {cpu} - // Stability: development - K8SPodCPUUsageName = "k8s.pod.cpu.usage" - K8SPodCPUUsageUnit = "{cpu}" - K8SPodCPUUsageDescription = "Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" - // K8SPodMemoryUsage is the metric conforming to the "k8s.pod.memory.usage" - // semantic conventions. It represents the memory usage of the Pod. - // Instrument: gauge - // Unit: By - // Stability: development - K8SPodMemoryUsageName = "k8s.pod.memory.usage" - K8SPodMemoryUsageUnit = "By" - K8SPodMemoryUsageDescription = "Memory usage of the Pod" - // K8SPodNetworkErrors is the metric conforming to the "k8s.pod.network.errors" - // semantic conventions. It represents the pod network errors. - // Instrument: counter - // Unit: {error} - // Stability: development - K8SPodNetworkErrorsName = "k8s.pod.network.errors" - K8SPodNetworkErrorsUnit = "{error}" - K8SPodNetworkErrorsDescription = "Pod network errors" - // K8SPodNetworkIo is the metric conforming to the "k8s.pod.network.io" - // semantic conventions. It represents the network bytes for the Pod. - // Instrument: counter - // Unit: By - // Stability: development - K8SPodNetworkIoName = "k8s.pod.network.io" - K8SPodNetworkIoUnit = "By" - K8SPodNetworkIoDescription = "Network bytes for the Pod" - // K8SPodUptime is the metric conforming to the "k8s.pod.uptime" semantic - // conventions. It represents the time the Pod has been running. - // Instrument: gauge - // Unit: s - // Stability: development - K8SPodUptimeName = "k8s.pod.uptime" - K8SPodUptimeUnit = "s" - K8SPodUptimeDescription = "The time the Pod has been running" - // K8SReplicaSetAvailablePods is the metric conforming to the - // "k8s.replicaset.available_pods" semantic conventions. It represents the - // total number of available replica pods (ready for at least minReadySeconds) - // targeted by this replicaset. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicaSetAvailablePodsName = "k8s.replicaset.available_pods" - K8SReplicaSetAvailablePodsUnit = "{pod}" - K8SReplicaSetAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset" - // K8SReplicaSetDesiredPods is the metric conforming to the - // "k8s.replicaset.desired_pods" semantic conventions. It represents the number - // of desired replica pods in this replicaset. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicaSetDesiredPodsName = "k8s.replicaset.desired_pods" - K8SReplicaSetDesiredPodsUnit = "{pod}" - K8SReplicaSetDesiredPodsDescription = "Number of desired replica pods in this replicaset" - // K8SReplicationControllerAvailablePods is the metric conforming to the - // "k8s.replication_controller.available_pods" semantic conventions. It - // represents the total number of available replica pods (ready for at least - // minReadySeconds) targeted by this replication controller. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicationControllerAvailablePodsName = "k8s.replication_controller.available_pods" - K8SReplicationControllerAvailablePodsUnit = "{pod}" - K8SReplicationControllerAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller" - // K8SReplicationControllerDesiredPods is the metric conforming to the - // "k8s.replication_controller.desired_pods" semantic conventions. It - // represents the number of desired replica pods in this replication - // controller. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SReplicationControllerDesiredPodsName = "k8s.replication_controller.desired_pods" - K8SReplicationControllerDesiredPodsUnit = "{pod}" - K8SReplicationControllerDesiredPodsDescription = "Number of desired replica pods in this replication controller" - // K8SStatefulSetCurrentPods is the metric conforming to the - // "k8s.statefulset.current_pods" semantic conventions. It represents the - // number of replica pods created by the statefulset controller from the - // statefulset version indicated by currentRevision. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetCurrentPodsName = "k8s.statefulset.current_pods" - K8SStatefulSetCurrentPodsUnit = "{pod}" - K8SStatefulSetCurrentPodsDescription = "The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision" - // K8SStatefulSetDesiredPods is the metric conforming to the - // "k8s.statefulset.desired_pods" semantic conventions. It represents the - // number of desired replica pods in this statefulset. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetDesiredPodsName = "k8s.statefulset.desired_pods" - K8SStatefulSetDesiredPodsUnit = "{pod}" - K8SStatefulSetDesiredPodsDescription = "Number of desired replica pods in this statefulset" - // K8SStatefulSetReadyPods is the metric conforming to the - // "k8s.statefulset.ready_pods" semantic conventions. It represents the number - // of replica pods created for this statefulset with a Ready Condition. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetReadyPodsName = "k8s.statefulset.ready_pods" - K8SStatefulSetReadyPodsUnit = "{pod}" - K8SStatefulSetReadyPodsDescription = "The number of replica pods created for this statefulset with a Ready Condition" - // K8SStatefulSetUpdatedPods is the metric conforming to the - // "k8s.statefulset.updated_pods" semantic conventions. It represents the - // number of replica pods created by the statefulset controller from the - // statefulset version indicated by updateRevision. - // Instrument: updowncounter - // Unit: {pod} - // Stability: development - K8SStatefulSetUpdatedPodsName = "k8s.statefulset.updated_pods" - K8SStatefulSetUpdatedPodsUnit = "{pod}" - K8SStatefulSetUpdatedPodsDescription = "Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision" - // KestrelActiveConnections is the metric conforming to the - // "kestrel.active_connections" semantic conventions. It represents the number - // of connections that are currently active on the server. - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - KestrelActiveConnectionsName = "kestrel.active_connections" - KestrelActiveConnectionsUnit = "{connection}" - KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." - // KestrelActiveTLSHandshakes is the metric conforming to the - // "kestrel.active_tls_handshakes" semantic conventions. It represents the - // number of TLS handshakes that are currently in progress on the server. - // Instrument: updowncounter - // Unit: {handshake} - // Stability: stable - KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" - KestrelActiveTLSHandshakesUnit = "{handshake}" - KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." - // KestrelConnectionDuration is the metric conforming to the - // "kestrel.connection.duration" semantic conventions. It represents the - // duration of connections on the server. - // Instrument: histogram - // Unit: s - // Stability: stable - KestrelConnectionDurationName = "kestrel.connection.duration" - KestrelConnectionDurationUnit = "s" - KestrelConnectionDurationDescription = "The duration of connections on the server." - // KestrelQueuedConnections is the metric conforming to the - // "kestrel.queued_connections" semantic conventions. It represents the number - // of connections that are currently queued and are waiting to start. - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - KestrelQueuedConnectionsName = "kestrel.queued_connections" - KestrelQueuedConnectionsUnit = "{connection}" - KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." - // KestrelQueuedRequests is the metric conforming to the - // "kestrel.queued_requests" semantic conventions. It represents the number of - // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are - // currently queued and are waiting to start. - // Instrument: updowncounter - // Unit: {request} - // Stability: stable - KestrelQueuedRequestsName = "kestrel.queued_requests" - KestrelQueuedRequestsUnit = "{request}" - KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." - // KestrelRejectedConnections is the metric conforming to the - // "kestrel.rejected_connections" semantic conventions. It represents the - // number of connections rejected by the server. - // Instrument: counter - // Unit: {connection} - // Stability: stable - KestrelRejectedConnectionsName = "kestrel.rejected_connections" - KestrelRejectedConnectionsUnit = "{connection}" - KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." - // KestrelTLSHandshakeDuration is the metric conforming to the - // "kestrel.tls_handshake.duration" semantic conventions. It represents the - // duration of TLS handshakes on the server. - // Instrument: histogram - // Unit: s - // Stability: stable - KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" - KestrelTLSHandshakeDurationUnit = "s" - KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." - // KestrelUpgradedConnections is the metric conforming to the - // "kestrel.upgraded_connections" semantic conventions. It represents the - // number of connections that are currently upgraded (WebSockets). . - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" - KestrelUpgradedConnectionsUnit = "{connection}" - KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." - // MessagingClientConsumedMessages is the metric conforming to the - // "messaging.client.consumed.messages" semantic conventions. It represents the - // number of messages that were delivered to the application. - // Instrument: counter - // Unit: {message} - // Stability: development - MessagingClientConsumedMessagesName = "messaging.client.consumed.messages" - MessagingClientConsumedMessagesUnit = "{message}" - MessagingClientConsumedMessagesDescription = "Number of messages that were delivered to the application." - // MessagingClientOperationDuration is the metric conforming to the - // "messaging.client.operation.duration" semantic conventions. It represents - // the duration of messaging operation initiated by a producer or consumer - // client. - // Instrument: histogram - // Unit: s - // Stability: development - MessagingClientOperationDurationName = "messaging.client.operation.duration" - MessagingClientOperationDurationUnit = "s" - MessagingClientOperationDurationDescription = "Duration of messaging operation initiated by a producer or consumer client." - // MessagingClientPublishedMessages is the metric conforming to the - // "messaging.client.published.messages" semantic conventions. It represents - // the deprecated. Use `messaging.client.sent.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.sent.messages`. - MessagingClientPublishedMessagesName = "messaging.client.published.messages" - MessagingClientPublishedMessagesUnit = "{message}" - MessagingClientPublishedMessagesDescription = "Deprecated. Use `messaging.client.sent.messages` instead." - // MessagingClientSentMessages is the metric conforming to the - // "messaging.client.sent.messages" semantic conventions. It represents the - // number of messages producer attempted to send to the broker. - // Instrument: counter - // Unit: {message} - // Stability: development - MessagingClientSentMessagesName = "messaging.client.sent.messages" - MessagingClientSentMessagesUnit = "{message}" - MessagingClientSentMessagesDescription = "Number of messages producer attempted to send to the broker." - // MessagingProcessDuration is the metric conforming to the - // "messaging.process.duration" semantic conventions. It represents the - // duration of processing operation. - // Instrument: histogram - // Unit: s - // Stability: development - MessagingProcessDurationName = "messaging.process.duration" - MessagingProcessDurationUnit = "s" - MessagingProcessDurationDescription = "Duration of processing operation." - // MessagingProcessMessages is the metric conforming to the - // "messaging.process.messages" semantic conventions. It represents the - // deprecated. Use `messaging.client.consumed.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.consumed.messages`. - MessagingProcessMessagesName = "messaging.process.messages" - MessagingProcessMessagesUnit = "{message}" - MessagingProcessMessagesDescription = "Deprecated. Use `messaging.client.consumed.messages` instead." - // MessagingPublishDuration is the metric conforming to the - // "messaging.publish.duration" semantic conventions. It represents the - // deprecated. Use `messaging.client.operation.duration` instead. - // Instrument: histogram - // Unit: s - // Stability: development - // Deprecated: Replaced by `messaging.client.operation.duration`. - MessagingPublishDurationName = "messaging.publish.duration" - MessagingPublishDurationUnit = "s" - MessagingPublishDurationDescription = "Deprecated. Use `messaging.client.operation.duration` instead." - // MessagingPublishMessages is the metric conforming to the - // "messaging.publish.messages" semantic conventions. It represents the - // deprecated. Use `messaging.client.produced.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.produced.messages`. - MessagingPublishMessagesName = "messaging.publish.messages" - MessagingPublishMessagesUnit = "{message}" - MessagingPublishMessagesDescription = "Deprecated. Use `messaging.client.produced.messages` instead." - // MessagingReceiveDuration is the metric conforming to the - // "messaging.receive.duration" semantic conventions. It represents the - // deprecated. Use `messaging.client.operation.duration` instead. - // Instrument: histogram - // Unit: s - // Stability: development - // Deprecated: Replaced by `messaging.client.operation.duration`. - MessagingReceiveDurationName = "messaging.receive.duration" - MessagingReceiveDurationUnit = "s" - MessagingReceiveDurationDescription = "Deprecated. Use `messaging.client.operation.duration` instead." - // MessagingReceiveMessages is the metric conforming to the - // "messaging.receive.messages" semantic conventions. It represents the - // deprecated. Use `messaging.client.consumed.messages` instead. - // Instrument: counter - // Unit: {message} - // Stability: development - // Deprecated: Replaced by `messaging.client.consumed.messages`. - MessagingReceiveMessagesName = "messaging.receive.messages" - MessagingReceiveMessagesUnit = "{message}" - MessagingReceiveMessagesDescription = "Deprecated. Use `messaging.client.consumed.messages` instead." - // ProcessContextSwitches is the metric conforming to the - // "process.context_switches" semantic conventions. It represents the number of - // times the process has been context switched. - // Instrument: counter - // Unit: {count} - // Stability: development - ProcessContextSwitchesName = "process.context_switches" - ProcessContextSwitchesUnit = "{count}" - ProcessContextSwitchesDescription = "Number of times the process has been context switched." - // ProcessCPUTime is the metric conforming to the "process.cpu.time" semantic - // conventions. It represents the total CPU seconds broken down by different - // states. - // Instrument: counter - // Unit: s - // Stability: development - ProcessCPUTimeName = "process.cpu.time" - ProcessCPUTimeUnit = "s" - ProcessCPUTimeDescription = "Total CPU seconds broken down by different states." - // ProcessCPUUtilization is the metric conforming to the - // "process.cpu.utilization" semantic conventions. It represents the difference - // in process.cpu.time since the last measurement, divided by the elapsed time - // and number of CPUs available to the process. - // Instrument: gauge - // Unit: 1 - // Stability: development - ProcessCPUUtilizationName = "process.cpu.utilization" - ProcessCPUUtilizationUnit = "1" - ProcessCPUUtilizationDescription = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process." - // ProcessDiskIo is the metric conforming to the "process.disk.io" semantic - // conventions. It represents the disk bytes transferred. - // Instrument: counter - // Unit: By - // Stability: development - ProcessDiskIoName = "process.disk.io" - ProcessDiskIoUnit = "By" - ProcessDiskIoDescription = "Disk bytes transferred." - // ProcessMemoryUsage is the metric conforming to the "process.memory.usage" - // semantic conventions. It represents the amount of physical memory in use. - // Instrument: updowncounter - // Unit: By - // Stability: development - ProcessMemoryUsageName = "process.memory.usage" - ProcessMemoryUsageUnit = "By" - ProcessMemoryUsageDescription = "The amount of physical memory in use." - // ProcessMemoryVirtual is the metric conforming to the - // "process.memory.virtual" semantic conventions. It represents the amount of - // committed virtual memory. - // Instrument: updowncounter - // Unit: By - // Stability: development - ProcessMemoryVirtualName = "process.memory.virtual" - ProcessMemoryVirtualUnit = "By" - ProcessMemoryVirtualDescription = "The amount of committed virtual memory." - // ProcessNetworkIo is the metric conforming to the "process.network.io" - // semantic conventions. It represents the network bytes transferred. - // Instrument: counter - // Unit: By - // Stability: development - ProcessNetworkIoName = "process.network.io" - ProcessNetworkIoUnit = "By" - ProcessNetworkIoDescription = "Network bytes transferred." - // ProcessOpenFileDescriptorCount is the metric conforming to the - // "process.open_file_descriptor.count" semantic conventions. It represents the - // number of file descriptors in use by the process. - // Instrument: updowncounter - // Unit: {count} - // Stability: development - ProcessOpenFileDescriptorCountName = "process.open_file_descriptor.count" - ProcessOpenFileDescriptorCountUnit = "{count}" - ProcessOpenFileDescriptorCountDescription = "Number of file descriptors in use by the process." - // ProcessPagingFaults is the metric conforming to the "process.paging.faults" - // semantic conventions. It represents the number of page faults the process - // has made. - // Instrument: counter - // Unit: {fault} - // Stability: development - ProcessPagingFaultsName = "process.paging.faults" - ProcessPagingFaultsUnit = "{fault}" - ProcessPagingFaultsDescription = "Number of page faults the process has made." - // ProcessThreadCount is the metric conforming to the "process.thread.count" - // semantic conventions. It represents the process threads count. - // Instrument: updowncounter - // Unit: {thread} - // Stability: development - ProcessThreadCountName = "process.thread.count" - ProcessThreadCountUnit = "{thread}" - ProcessThreadCountDescription = "Process threads count." - // ProcessUptime is the metric conforming to the "process.uptime" semantic - // conventions. It represents the time the process has been running. - // Instrument: gauge - // Unit: s - // Stability: development - ProcessUptimeName = "process.uptime" - ProcessUptimeUnit = "s" - ProcessUptimeDescription = "The time the process has been running." - // RPCClientDuration is the metric conforming to the "rpc.client.duration" - // semantic conventions. It represents the measures the duration of outbound - // RPC. - // Instrument: histogram - // Unit: ms - // Stability: development - RPCClientDurationName = "rpc.client.duration" - RPCClientDurationUnit = "ms" - RPCClientDurationDescription = "Measures the duration of outbound RPC." - // RPCClientRequestSize is the metric conforming to the - // "rpc.client.request.size" semantic conventions. It represents the measures - // the size of RPC request messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCClientRequestSizeName = "rpc.client.request.size" - RPCClientRequestSizeUnit = "By" - RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." - // RPCClientRequestsPerRPC is the metric conforming to the - // "rpc.client.requests_per_rpc" semantic conventions. It represents the - // measures the number of messages received per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" - RPCClientRequestsPerRPCUnit = "{count}" - RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." - // RPCClientResponseSize is the metric conforming to the - // "rpc.client.response.size" semantic conventions. It represents the measures - // the size of RPC response messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCClientResponseSizeName = "rpc.client.response.size" - RPCClientResponseSizeUnit = "By" - RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." - // RPCClientResponsesPerRPC is the metric conforming to the - // "rpc.client.responses_per_rpc" semantic conventions. It represents the - // measures the number of messages sent per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" - RPCClientResponsesPerRPCUnit = "{count}" - RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." - // RPCServerDuration is the metric conforming to the "rpc.server.duration" - // semantic conventions. It represents the measures the duration of inbound - // RPC. - // Instrument: histogram - // Unit: ms - // Stability: development - RPCServerDurationName = "rpc.server.duration" - RPCServerDurationUnit = "ms" - RPCServerDurationDescription = "Measures the duration of inbound RPC." - // RPCServerRequestSize is the metric conforming to the - // "rpc.server.request.size" semantic conventions. It represents the measures - // the size of RPC request messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCServerRequestSizeName = "rpc.server.request.size" - RPCServerRequestSizeUnit = "By" - RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." - // RPCServerRequestsPerRPC is the metric conforming to the - // "rpc.server.requests_per_rpc" semantic conventions. It represents the - // measures the number of messages received per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" - RPCServerRequestsPerRPCUnit = "{count}" - RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." - // RPCServerResponseSize is the metric conforming to the - // "rpc.server.response.size" semantic conventions. It represents the measures - // the size of RPC response messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: development - RPCServerResponseSizeName = "rpc.server.response.size" - RPCServerResponseSizeUnit = "By" - RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." - // RPCServerResponsesPerRPC is the metric conforming to the - // "rpc.server.responses_per_rpc" semantic conventions. It represents the - // measures the number of messages sent per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: development - RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" - RPCServerResponsesPerRPCUnit = "{count}" - RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." - // SignalrServerActiveConnections is the metric conforming to the - // "signalr.server.active_connections" semantic conventions. It represents the - // number of connections that are currently active on the server. - // Instrument: updowncounter - // Unit: {connection} - // Stability: stable - SignalrServerActiveConnectionsName = "signalr.server.active_connections" - SignalrServerActiveConnectionsUnit = "{connection}" - SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." - // SignalrServerConnectionDuration is the metric conforming to the - // "signalr.server.connection.duration" semantic conventions. It represents the - // duration of connections on the server. - // Instrument: histogram - // Unit: s - // Stability: stable - SignalrServerConnectionDurationName = "signalr.server.connection.duration" - SignalrServerConnectionDurationUnit = "s" - SignalrServerConnectionDurationDescription = "The duration of connections on the server." - // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" - // semantic conventions. It represents the reports the current frequency of the - // CPU in Hz. - // Instrument: gauge - // Unit: {Hz} - // Stability: development - SystemCPUFrequencyName = "system.cpu.frequency" - SystemCPUFrequencyUnit = "{Hz}" - SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" - // SystemCPULogicalCount is the metric conforming to the - // "system.cpu.logical.count" semantic conventions. It represents the reports - // the number of logical (virtual) processor cores created by the operating - // system to manage multitasking. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: development - SystemCPULogicalCountName = "system.cpu.logical.count" - SystemCPULogicalCountUnit = "{cpu}" - SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" - // SystemCPUPhysicalCount is the metric conforming to the - // "system.cpu.physical.count" semantic conventions. It represents the reports - // the number of actual physical processor cores on the hardware. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: development - SystemCPUPhysicalCountName = "system.cpu.physical.count" - SystemCPUPhysicalCountUnit = "{cpu}" - SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" - // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic - // conventions. It represents the seconds each logical CPU spent on each mode. - // Instrument: counter - // Unit: s - // Stability: development - SystemCPUTimeName = "system.cpu.time" - SystemCPUTimeUnit = "s" - SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" - // SystemCPUUtilization is the metric conforming to the - // "system.cpu.utilization" semantic conventions. It represents the difference - // in system.cpu.time since the last measurement, divided by the elapsed time - // and number of logical CPUs. - // Instrument: gauge - // Unit: 1 - // Stability: development - SystemCPUUtilizationName = "system.cpu.utilization" - SystemCPUUtilizationUnit = "1" - SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" - // SystemDiskIo is the metric conforming to the "system.disk.io" semantic - // conventions. - // Instrument: counter - // Unit: By - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskIoName = "system.disk.io" - SystemDiskIoUnit = "By" - // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" - // semantic conventions. It represents the time disk spent activated. - // Instrument: counter - // Unit: s - // Stability: development - SystemDiskIoTimeName = "system.disk.io_time" - SystemDiskIoTimeUnit = "s" - SystemDiskIoTimeDescription = "Time disk spent activated" - // SystemDiskLimit is the metric conforming to the "system.disk.limit" semantic - // conventions. It represents the total storage capacity of the disk. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemDiskLimitName = "system.disk.limit" - SystemDiskLimitUnit = "By" - SystemDiskLimitDescription = "The total storage capacity of the disk" - // SystemDiskMerged is the metric conforming to the "system.disk.merged" - // semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskMergedName = "system.disk.merged" - SystemDiskMergedUnit = "{operation}" - // SystemDiskOperationTime is the metric conforming to the - // "system.disk.operation_time" semantic conventions. It represents the sum of - // the time each operation took to complete. - // Instrument: counter - // Unit: s - // Stability: development - SystemDiskOperationTimeName = "system.disk.operation_time" - SystemDiskOperationTimeUnit = "s" - SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" - // SystemDiskOperations is the metric conforming to the - // "system.disk.operations" semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskOperationsName = "system.disk.operations" - SystemDiskOperationsUnit = "{operation}" - // SystemFilesystemLimit is the metric conforming to the - // "system.filesystem.limit" semantic conventions. It represents the total - // storage capacity of the filesystem. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemFilesystemLimitName = "system.filesystem.limit" - SystemFilesystemLimitUnit = "By" - SystemFilesystemLimitDescription = "The total storage capacity of the filesystem" - // SystemFilesystemUsage is the metric conforming to the - // "system.filesystem.usage" semantic conventions. It represents the reports a - // filesystem's space usage across different states. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemFilesystemUsageName = "system.filesystem.usage" - SystemFilesystemUsageUnit = "By" - SystemFilesystemUsageDescription = "Reports a filesystem's space usage across different states." - // SystemFilesystemUtilization is the metric conforming to the - // "system.filesystem.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemFilesystemUtilizationName = "system.filesystem.utilization" - SystemFilesystemUtilizationUnit = "1" - // SystemLinuxMemoryAvailable is the metric conforming to the - // "system.linux.memory.available" semantic conventions. It represents an - // estimate of how much memory is available for starting new applications, - // without causing swapping. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemLinuxMemoryAvailableName = "system.linux.memory.available" - SystemLinuxMemoryAvailableUnit = "By" - SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" - // SystemLinuxMemorySlabUsage is the metric conforming to the - // "system.linux.memory.slab.usage" semantic conventions. It represents the - // reports the memory used by the Linux kernel for managing caches of - // frequently used objects. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemLinuxMemorySlabUsageName = "system.linux.memory.slab.usage" - SystemLinuxMemorySlabUsageUnit = "By" - SystemLinuxMemorySlabUsageDescription = "Reports the memory used by the Linux kernel for managing caches of frequently used objects." - // SystemMemoryLimit is the metric conforming to the "system.memory.limit" - // semantic conventions. It represents the total memory available in the - // system. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemMemoryLimitName = "system.memory.limit" - SystemMemoryLimitUnit = "By" - SystemMemoryLimitDescription = "Total memory available in the system." - // SystemMemoryShared is the metric conforming to the "system.memory.shared" - // semantic conventions. It represents the shared memory used (mostly by - // tmpfs). - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemMemorySharedName = "system.memory.shared" - SystemMemorySharedUnit = "By" - SystemMemorySharedDescription = "Shared memory used (mostly by tmpfs)." - // SystemMemoryUsage is the metric conforming to the "system.memory.usage" - // semantic conventions. It represents the reports memory in use by state. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemMemoryUsageName = "system.memory.usage" - SystemMemoryUsageUnit = "By" - SystemMemoryUsageDescription = "Reports memory in use by state." - // SystemMemoryUtilization is the metric conforming to the - // "system.memory.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemMemoryUtilizationName = "system.memory.utilization" - SystemMemoryUtilizationUnit = "1" - // SystemNetworkConnections is the metric conforming to the - // "system.network.connections" semantic conventions. - // Instrument: updowncounter - // Unit: {connection} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkConnectionsName = "system.network.connections" - SystemNetworkConnectionsUnit = "{connection}" - // SystemNetworkDropped is the metric conforming to the - // "system.network.dropped" semantic conventions. It represents the count of - // packets that are dropped or discarded even though there was no error. - // Instrument: counter - // Unit: {packet} - // Stability: development - SystemNetworkDroppedName = "system.network.dropped" - SystemNetworkDroppedUnit = "{packet}" - SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" - // SystemNetworkErrors is the metric conforming to the "system.network.errors" - // semantic conventions. It represents the count of network errors detected. - // Instrument: counter - // Unit: {error} - // Stability: development - SystemNetworkErrorsName = "system.network.errors" - SystemNetworkErrorsUnit = "{error}" - SystemNetworkErrorsDescription = "Count of network errors detected" - // SystemNetworkIo is the metric conforming to the "system.network.io" semantic - // conventions. - // Instrument: counter - // Unit: By - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkIoName = "system.network.io" - SystemNetworkIoUnit = "By" - // SystemNetworkPackets is the metric conforming to the - // "system.network.packets" semantic conventions. - // Instrument: counter - // Unit: {packet} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkPacketsName = "system.network.packets" - SystemNetworkPacketsUnit = "{packet}" - // SystemPagingFaults is the metric conforming to the "system.paging.faults" - // semantic conventions. - // Instrument: counter - // Unit: {fault} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingFaultsName = "system.paging.faults" - SystemPagingFaultsUnit = "{fault}" - // SystemPagingOperations is the metric conforming to the - // "system.paging.operations" semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingOperationsName = "system.paging.operations" - SystemPagingOperationsUnit = "{operation}" - // SystemPagingUsage is the metric conforming to the "system.paging.usage" - // semantic conventions. It represents the unix swap or windows pagefile usage. - // Instrument: updowncounter - // Unit: By - // Stability: development - SystemPagingUsageName = "system.paging.usage" - SystemPagingUsageUnit = "By" - SystemPagingUsageDescription = "Unix swap or windows pagefile usage" - // SystemPagingUtilization is the metric conforming to the - // "system.paging.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: development - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingUtilizationName = "system.paging.utilization" - SystemPagingUtilizationUnit = "1" - // SystemProcessCount is the metric conforming to the "system.process.count" - // semantic conventions. It represents the total number of processes in each - // state. - // Instrument: updowncounter - // Unit: {process} - // Stability: development - SystemProcessCountName = "system.process.count" - SystemProcessCountUnit = "{process}" - SystemProcessCountDescription = "Total number of processes in each state" - // SystemProcessCreated is the metric conforming to the - // "system.process.created" semantic conventions. It represents the total - // number of processes created over uptime of the host. - // Instrument: counter - // Unit: {process} - // Stability: development - SystemProcessCreatedName = "system.process.created" - SystemProcessCreatedUnit = "{process}" - SystemProcessCreatedDescription = "Total number of processes created over uptime of the host" - // SystemUptime is the metric conforming to the "system.uptime" semantic - // conventions. It represents the time the system has been running. - // Instrument: gauge - // Unit: s - // Stability: development - SystemUptimeName = "system.uptime" - SystemUptimeUnit = "s" - SystemUptimeDescription = "The time the system has been running" - // VCSChangeCount is the metric conforming to the "vcs.change.count" semantic - // conventions. It represents the number of changes (pull requests/merge - // requests/changelists) in a repository, categorized by their state (e.g. open - // or merged). - // Instrument: updowncounter - // Unit: {change} - // Stability: development - VCSChangeCountName = "vcs.change.count" - VCSChangeCountUnit = "{change}" - VCSChangeCountDescription = "The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged)" - // VCSChangeDuration is the metric conforming to the "vcs.change.duration" - // semantic conventions. It represents the time duration a change (pull - // request/merge request/changelist) has been in a given state. - // Instrument: gauge - // Unit: s - // Stability: development - VCSChangeDurationName = "vcs.change.duration" - VCSChangeDurationUnit = "s" - VCSChangeDurationDescription = "The time duration a change (pull request/merge request/changelist) has been in a given state." - // VCSChangeTimeToApproval is the metric conforming to the - // "vcs.change.time_to_approval" semantic conventions. It represents the amount - // of time since its creation it took a change (pull request/merge - // request/changelist) to get the first approval. - // Instrument: gauge - // Unit: s - // Stability: development - VCSChangeTimeToApprovalName = "vcs.change.time_to_approval" - VCSChangeTimeToApprovalUnit = "s" - VCSChangeTimeToApprovalDescription = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval." - // VCSChangeTimeToMerge is the metric conforming to the - // "vcs.change.time_to_merge" semantic conventions. It represents the amount of - // time since its creation it took a change (pull request/merge - // request/changelist) to get merged into the target(base) ref. - // Instrument: gauge - // Unit: s - // Stability: development - VCSChangeTimeToMergeName = "vcs.change.time_to_merge" - VCSChangeTimeToMergeUnit = "s" - VCSChangeTimeToMergeDescription = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref." - // VCSContributorCount is the metric conforming to the "vcs.contributor.count" - // semantic conventions. It represents the number of unique contributors to a - // repository. - // Instrument: gauge - // Unit: {contributor} - // Stability: development - VCSContributorCountName = "vcs.contributor.count" - VCSContributorCountUnit = "{contributor}" - VCSContributorCountDescription = "The number of unique contributors to a repository" - // VCSRefCount is the metric conforming to the "vcs.ref.count" semantic - // conventions. It represents the number of refs of type branch or tag in a - // repository. - // Instrument: updowncounter - // Unit: {ref} - // Stability: development - VCSRefCountName = "vcs.ref.count" - VCSRefCountUnit = "{ref}" - VCSRefCountDescription = "The number of refs of type branch or tag in a repository." - // VCSRefLinesDelta is the metric conforming to the "vcs.ref.lines_delta" - // semantic conventions. It represents the number of lines added/removed in a - // ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. - // Instrument: gauge - // Unit: {line} - // Stability: development - VCSRefLinesDeltaName = "vcs.ref.lines_delta" - VCSRefLinesDeltaUnit = "{line}" - VCSRefLinesDeltaDescription = "The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute." - // VCSRefRevisionsDelta is the metric conforming to the - // "vcs.ref.revisions_delta" semantic conventions. It represents the number of - // revisions (commits) a ref (branch) is ahead/behind the branch from the - // `vcs.ref.base.name` attribute. - // Instrument: gauge - // Unit: {revision} - // Stability: development - VCSRefRevisionsDeltaName = "vcs.ref.revisions_delta" - VCSRefRevisionsDeltaUnit = "{revision}" - VCSRefRevisionsDeltaDescription = "The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute" - // VCSRefTime is the metric conforming to the "vcs.ref.time" semantic - // conventions. It represents the time a ref (branch) created from the default - // branch (trunk) has existed. The `ref.type` attribute will always be `branch` - // . - // Instrument: gauge - // Unit: s - // Stability: development - VCSRefTimeName = "vcs.ref.time" - VCSRefTimeUnit = "s" - VCSRefTimeDescription = "Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`" - // VCSRepositoryCount is the metric conforming to the "vcs.repository.count" - // semantic conventions. It represents the number of repositories in an - // organization. - // Instrument: updowncounter - // Unit: {repository} - // Stability: development - VCSRepositoryCountName = "vcs.repository.count" - VCSRepositoryCountUnit = "{repository}" - VCSRepositoryCountDescription = "The number of repositories in an organization." -) \ No newline at end of file + // AzureCosmosDBClientActiveInstanceCount is the metric conforming to the + // "azure.cosmosdb.client.active_instance.count" semantic conventions. It + // represents the number of active client instances. + // Instrument: updowncounter + // Unit: {instance} + // Stability: development + AzureCosmosDBClientActiveInstanceCountName = "azure.cosmosdb.client.active_instance.count" + AzureCosmosDBClientActiveInstanceCountUnit = "{instance}" + AzureCosmosDBClientActiveInstanceCountDescription = "Number of active client instances" + // AzureCosmosDBClientOperationRequestCharge is the metric conforming to the + // "azure.cosmosdb.client.operation.request_charge" semantic conventions. It + // represents the [Request units] consumed by the operation. + // + // [Request units]: https://learn.microsoft.com/azure/cosmos-db/request-units + // Instrument: histogram + // Unit: {request_unit} + // Stability: development + AzureCosmosDBClientOperationRequestChargeName = "azure.cosmosdb.client.operation.request_charge" + AzureCosmosDBClientOperationRequestChargeUnit = "{request_unit}" + AzureCosmosDBClientOperationRequestChargeDescription = "[Request units](https://learn.microsoft.com/azure/cosmos-db/request-units) consumed by the operation" + // CICDPipelineRunActive is the metric conforming to the + // "cicd.pipeline.run.active" semantic conventions. It represents the number of + // pipeline runs currently active in the system by state. + // Instrument: updowncounter + // Unit: {run} + // Stability: development + CICDPipelineRunActiveName = "cicd.pipeline.run.active" + CICDPipelineRunActiveUnit = "{run}" + CICDPipelineRunActiveDescription = "The number of pipeline runs currently active in the system by state." + // CICDPipelineRunDuration is the metric conforming to the + // "cicd.pipeline.run.duration" semantic conventions. It represents the + // duration of a pipeline run grouped by pipeline, state and result. + // Instrument: histogram + // Unit: s + // Stability: development + CICDPipelineRunDurationName = "cicd.pipeline.run.duration" + CICDPipelineRunDurationUnit = "s" + CICDPipelineRunDurationDescription = "Duration of a pipeline run grouped by pipeline, state and result." + // CICDPipelineRunErrors is the metric conforming to the + // "cicd.pipeline.run.errors" semantic conventions. It represents the number of + // errors encountered in pipeline runs (eg. compile, test failures). + // Instrument: counter + // Unit: {error} + // Stability: development + CICDPipelineRunErrorsName = "cicd.pipeline.run.errors" + CICDPipelineRunErrorsUnit = "{error}" + CICDPipelineRunErrorsDescription = "The number of errors encountered in pipeline runs (eg. compile, test failures)." + // CICDSystemErrors is the metric conforming to the "cicd.system.errors" + // semantic conventions. It represents the number of errors in a component of + // the CICD system (eg. controller, scheduler, agent). + // Instrument: counter + // Unit: {error} + // Stability: development + CICDSystemErrorsName = "cicd.system.errors" + CICDSystemErrorsUnit = "{error}" + CICDSystemErrorsDescription = "The number of errors in a component of the CICD system (eg. controller, scheduler, agent)." + // CICDWorkerCount is the metric conforming to the "cicd.worker.count" semantic + // conventions. It represents the number of workers on the CICD system by + // state. + // Instrument: updowncounter + // Unit: {count} + // Stability: development + CICDWorkerCountName = "cicd.worker.count" + CICDWorkerCountUnit = "{count}" + CICDWorkerCountDescription = "The number of workers on the CICD system by state." + // ContainerCPUTime is the metric conforming to the "container.cpu.time" + // semantic conventions. It represents the total CPU time consumed. + // Instrument: counter + // Unit: s + // Stability: development + ContainerCPUTimeName = "container.cpu.time" + ContainerCPUTimeUnit = "s" + ContainerCPUTimeDescription = "Total CPU time consumed" + // ContainerCPUUsage is the metric conforming to the "container.cpu.usage" + // semantic conventions. It represents the container's CPU usage, measured in + // cpus. Range from 0 to the number of allocatable CPUs. + // Instrument: gauge + // Unit: {cpu} + // Stability: development + ContainerCPUUsageName = "container.cpu.usage" + ContainerCPUUsageUnit = "{cpu}" + ContainerCPUUsageDescription = "Container's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" + // ContainerDiskIo is the metric conforming to the "container.disk.io" semantic + // conventions. It represents the disk bytes for the container. + // Instrument: counter + // Unit: By + // Stability: development + ContainerDiskIoName = "container.disk.io" + ContainerDiskIoUnit = "By" + ContainerDiskIoDescription = "Disk bytes for the container." + // ContainerMemoryUsage is the metric conforming to the + // "container.memory.usage" semantic conventions. It represents the memory + // usage of the container. + // Instrument: counter + // Unit: By + // Stability: development + ContainerMemoryUsageName = "container.memory.usage" + ContainerMemoryUsageUnit = "By" + ContainerMemoryUsageDescription = "Memory usage of the container." + // ContainerNetworkIo is the metric conforming to the "container.network.io" + // semantic conventions. It represents the network bytes for the container. + // Instrument: counter + // Unit: By + // Stability: development + ContainerNetworkIoName = "container.network.io" + ContainerNetworkIoUnit = "By" + ContainerNetworkIoDescription = "Network bytes for the container." + // ContainerUptime is the metric conforming to the "container.uptime" semantic + // conventions. It represents the time the container has been running. + // Instrument: gauge + // Unit: s + // Stability: development + ContainerUptimeName = "container.uptime" + ContainerUptimeUnit = "s" + ContainerUptimeDescription = "The time the container has been running" + // DBClientConnectionCount is the metric conforming to the + // "db.client.connection.count" semantic conventions. It represents the number + // of connections that are currently in state described by the `state` + // attribute. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + DBClientConnectionCountName = "db.client.connection.count" + DBClientConnectionCountUnit = "{connection}" + DBClientConnectionCountDescription = "The number of connections that are currently in state described by the `state` attribute" + // DBClientConnectionCreateTime is the metric conforming to the + // "db.client.connection.create_time" semantic conventions. It represents the + // time it took to create a new connection. + // Instrument: histogram + // Unit: s + // Stability: development + DBClientConnectionCreateTimeName = "db.client.connection.create_time" + DBClientConnectionCreateTimeUnit = "s" + DBClientConnectionCreateTimeDescription = "The time it took to create a new connection" + // DBClientConnectionIdleMax is the metric conforming to the + // "db.client.connection.idle.max" semantic conventions. It represents the + // maximum number of idle open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + DBClientConnectionIdleMaxName = "db.client.connection.idle.max" + DBClientConnectionIdleMaxUnit = "{connection}" + DBClientConnectionIdleMaxDescription = "The maximum number of idle open connections allowed" + // DBClientConnectionIdleMin is the metric conforming to the + // "db.client.connection.idle.min" semantic conventions. It represents the + // minimum number of idle open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + DBClientConnectionIdleMinName = "db.client.connection.idle.min" + DBClientConnectionIdleMinUnit = "{connection}" + DBClientConnectionIdleMinDescription = "The minimum number of idle open connections allowed" + // DBClientConnectionMax is the metric conforming to the + // "db.client.connection.max" semantic conventions. It represents the maximum + // number of open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + DBClientConnectionMaxName = "db.client.connection.max" + DBClientConnectionMaxUnit = "{connection}" + DBClientConnectionMaxDescription = "The maximum number of open connections allowed" + // DBClientConnectionPendingRequests is the metric conforming to the + // "db.client.connection.pending_requests" semantic conventions. It represents + // the number of current pending requests for an open connection. + // Instrument: updowncounter + // Unit: {request} + // Stability: development + DBClientConnectionPendingRequestsName = "db.client.connection.pending_requests" + DBClientConnectionPendingRequestsUnit = "{request}" + DBClientConnectionPendingRequestsDescription = "The number of current pending requests for an open connection" + // DBClientConnectionTimeouts is the metric conforming to the + // "db.client.connection.timeouts" semantic conventions. It represents the + // number of connection timeouts that have occurred trying to obtain a + // connection from the pool. + // Instrument: counter + // Unit: {timeout} + // Stability: development + DBClientConnectionTimeoutsName = "db.client.connection.timeouts" + DBClientConnectionTimeoutsUnit = "{timeout}" + DBClientConnectionTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" + // DBClientConnectionUseTime is the metric conforming to the + // "db.client.connection.use_time" semantic conventions. It represents the time + // between borrowing a connection and returning it to the pool. + // Instrument: histogram + // Unit: s + // Stability: development + DBClientConnectionUseTimeName = "db.client.connection.use_time" + DBClientConnectionUseTimeUnit = "s" + DBClientConnectionUseTimeDescription = "The time between borrowing a connection and returning it to the pool" + // DBClientConnectionWaitTime is the metric conforming to the + // "db.client.connection.wait_time" semantic conventions. It represents the + // time it took to obtain an open connection from the pool. + // Instrument: histogram + // Unit: s + // Stability: development + DBClientConnectionWaitTimeName = "db.client.connection.wait_time" + DBClientConnectionWaitTimeUnit = "s" + DBClientConnectionWaitTimeDescription = "The time it took to obtain an open connection from the pool" + // DBClientConnectionsCreateTime is the metric conforming to the + // "db.client.connections.create_time" semantic conventions. It represents the + // deprecated, use `db.client.connection.create_time` instead. Note: the unit + // also changed from `ms` to `s`. + // Instrument: histogram + // Unit: ms + // Stability: development + // Deprecated: Replaced by `db.client.connection.create_time`. Note: the unit also changed from `ms` to `s`. + DBClientConnectionsCreateTimeName = "db.client.connections.create_time" + DBClientConnectionsCreateTimeUnit = "ms" + DBClientConnectionsCreateTimeDescription = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`." + // DBClientConnectionsIdleMax is the metric conforming to the + // "db.client.connections.idle.max" semantic conventions. It represents the + // deprecated, use `db.client.connection.idle.max` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + // Deprecated: Replaced by `db.client.connection.idle.max`. + DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" + DBClientConnectionsIdleMaxUnit = "{connection}" + DBClientConnectionsIdleMaxDescription = "Deprecated, use `db.client.connection.idle.max` instead." + // DBClientConnectionsIdleMin is the metric conforming to the + // "db.client.connections.idle.min" semantic conventions. It represents the + // deprecated, use `db.client.connection.idle.min` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + // Deprecated: Replaced by `db.client.connection.idle.min`. + DBClientConnectionsIdleMinName = "db.client.connections.idle.min" + DBClientConnectionsIdleMinUnit = "{connection}" + DBClientConnectionsIdleMinDescription = "Deprecated, use `db.client.connection.idle.min` instead." + // DBClientConnectionsMax is the metric conforming to the + // "db.client.connections.max" semantic conventions. It represents the + // deprecated, use `db.client.connection.max` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + // Deprecated: Replaced by `db.client.connection.max`. + DBClientConnectionsMaxName = "db.client.connections.max" + DBClientConnectionsMaxUnit = "{connection}" + DBClientConnectionsMaxDescription = "Deprecated, use `db.client.connection.max` instead." + // DBClientConnectionsPendingRequests is the metric conforming to the + // "db.client.connections.pending_requests" semantic conventions. It represents + // the deprecated, use `db.client.connection.pending_requests` instead. + // Instrument: updowncounter + // Unit: {request} + // Stability: development + // Deprecated: Replaced by `db.client.connection.pending_requests`. + DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" + DBClientConnectionsPendingRequestsUnit = "{request}" + DBClientConnectionsPendingRequestsDescription = "Deprecated, use `db.client.connection.pending_requests` instead." + // DBClientConnectionsTimeouts is the metric conforming to the + // "db.client.connections.timeouts" semantic conventions. It represents the + // deprecated, use `db.client.connection.timeouts` instead. + // Instrument: counter + // Unit: {timeout} + // Stability: development + // Deprecated: Replaced by `db.client.connection.timeouts`. + DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" + DBClientConnectionsTimeoutsUnit = "{timeout}" + DBClientConnectionsTimeoutsDescription = "Deprecated, use `db.client.connection.timeouts` instead." + // DBClientConnectionsUsage is the metric conforming to the + // "db.client.connections.usage" semantic conventions. It represents the + // deprecated, use `db.client.connection.count` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + // Deprecated: Replaced by `db.client.connection.count`. + DBClientConnectionsUsageName = "db.client.connections.usage" + DBClientConnectionsUsageUnit = "{connection}" + DBClientConnectionsUsageDescription = "Deprecated, use `db.client.connection.count` instead." + // DBClientConnectionsUseTime is the metric conforming to the + // "db.client.connections.use_time" semantic conventions. It represents the + // deprecated, use `db.client.connection.use_time` instead. Note: the unit also + // changed from `ms` to `s`. + // Instrument: histogram + // Unit: ms + // Stability: development + // Deprecated: Replaced by `db.client.connection.use_time`. Note: the unit also changed from `ms` to `s`. + DBClientConnectionsUseTimeName = "db.client.connections.use_time" + DBClientConnectionsUseTimeUnit = "ms" + DBClientConnectionsUseTimeDescription = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`." + // DBClientConnectionsWaitTime is the metric conforming to the + // "db.client.connections.wait_time" semantic conventions. It represents the + // deprecated, use `db.client.connection.wait_time` instead. Note: the unit + // also changed from `ms` to `s`. + // Instrument: histogram + // Unit: ms + // Stability: development + // Deprecated: Replaced by `db.client.connection.wait_time`. Note: the unit also changed from `ms` to `s`. + DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" + DBClientConnectionsWaitTimeUnit = "ms" + DBClientConnectionsWaitTimeDescription = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`." + // DBClientCosmosDBActiveInstanceCount is the metric conforming to the + // "db.client.cosmosdb.active_instance.count" semantic conventions. It + // represents the deprecated, use `azure.cosmosdb.client.active_instance.count` + // instead. + // Instrument: updowncounter + // Unit: {instance} + // Stability: development + // Deprecated: Replaced by `azure.cosmosdb.client.active_instance.count`. + DBClientCosmosDBActiveInstanceCountName = "db.client.cosmosdb.active_instance.count" + DBClientCosmosDBActiveInstanceCountUnit = "{instance}" + DBClientCosmosDBActiveInstanceCountDescription = "Deprecated, use `azure.cosmosdb.client.active_instance.count` instead." + // DBClientCosmosDBOperationRequestCharge is the metric conforming to the + // "db.client.cosmosdb.operation.request_charge" semantic conventions. It + // represents the deprecated, use + // `azure.cosmosdb.client.operation.request_charge` instead. + // Instrument: histogram + // Unit: {request_unit} + // Stability: development + // Deprecated: Replaced by `azure.cosmosdb.client.operation.request_charge`. + DBClientCosmosDBOperationRequestChargeName = "db.client.cosmosdb.operation.request_charge" + DBClientCosmosDBOperationRequestChargeUnit = "{request_unit}" + DBClientCosmosDBOperationRequestChargeDescription = "Deprecated, use `azure.cosmosdb.client.operation.request_charge` instead." + // DBClientOperationDuration is the metric conforming to the + // "db.client.operation.duration" semantic conventions. It represents the + // duration of database client operations. + // Instrument: histogram + // Unit: s + // Stability: release_candidate + DBClientOperationDurationName = "db.client.operation.duration" + DBClientOperationDurationUnit = "s" + DBClientOperationDurationDescription = "Duration of database client operations." + // DBClientResponseReturnedRows is the metric conforming to the + // "db.client.response.returned_rows" semantic conventions. It represents the + // actual number of records returned by the database operation. + // Instrument: histogram + // Unit: {row} + // Stability: development + DBClientResponseReturnedRowsName = "db.client.response.returned_rows" + DBClientResponseReturnedRowsUnit = "{row}" + DBClientResponseReturnedRowsDescription = "The actual number of records returned by the database operation." + // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" + // semantic conventions. It represents the measures the time taken to perform a + // DNS lookup. + // Instrument: histogram + // Unit: s + // Stability: development + DNSLookupDurationName = "dns.lookup.duration" + DNSLookupDurationUnit = "s" + DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." + // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic + // conventions. It represents the number of invocation cold starts. + // Instrument: counter + // Unit: {coldstart} + // Stability: development + FaaSColdstartsName = "faas.coldstarts" + FaaSColdstartsUnit = "{coldstart}" + FaaSColdstartsDescription = "Number of invocation cold starts" + // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic + // conventions. It represents the distribution of CPU usage per invocation. + // Instrument: histogram + // Unit: s + // Stability: development + FaaSCPUUsageName = "faas.cpu_usage" + FaaSCPUUsageUnit = "s" + FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" + // FaaSErrors is the metric conforming to the "faas.errors" semantic + // conventions. It represents the number of invocation errors. + // Instrument: counter + // Unit: {error} + // Stability: development + FaaSErrorsName = "faas.errors" + FaaSErrorsUnit = "{error}" + FaaSErrorsDescription = "Number of invocation errors" + // FaaSInitDuration is the metric conforming to the "faas.init_duration" + // semantic conventions. It represents the measures the duration of the + // function's initialization, such as a cold start. + // Instrument: histogram + // Unit: s + // Stability: development + FaaSInitDurationName = "faas.init_duration" + FaaSInitDurationUnit = "s" + FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" + // FaaSInvocations is the metric conforming to the "faas.invocations" semantic + // conventions. It represents the number of successful invocations. + // Instrument: counter + // Unit: {invocation} + // Stability: development + FaaSInvocationsName = "faas.invocations" + FaaSInvocationsUnit = "{invocation}" + FaaSInvocationsDescription = "Number of successful invocations" + // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" + // semantic conventions. It represents the measures the duration of the + // function's logic execution. + // Instrument: histogram + // Unit: s + // Stability: development + FaaSInvokeDurationName = "faas.invoke_duration" + FaaSInvokeDurationUnit = "s" + FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" + // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic + // conventions. It represents the distribution of max memory usage per + // invocation. + // Instrument: histogram + // Unit: By + // Stability: development + FaaSMemUsageName = "faas.mem_usage" + FaaSMemUsageUnit = "By" + FaaSMemUsageDescription = "Distribution of max memory usage per invocation" + // FaaSNetIo is the metric conforming to the "faas.net_io" semantic + // conventions. It represents the distribution of net I/O usage per invocation. + // Instrument: histogram + // Unit: By + // Stability: development + FaaSNetIoName = "faas.net_io" + FaaSNetIoUnit = "By" + FaaSNetIoDescription = "Distribution of net I/O usage per invocation" + // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic + // conventions. It represents the number of invocation timeouts. + // Instrument: counter + // Unit: {timeout} + // Stability: development + FaaSTimeoutsName = "faas.timeouts" + FaaSTimeoutsUnit = "{timeout}" + FaaSTimeoutsDescription = "Number of invocation timeouts" + // GenAIClientOperationDuration is the metric conforming to the + // "gen_ai.client.operation.duration" semantic conventions. It represents the + // genAI operation duration. + // Instrument: histogram + // Unit: s + // Stability: development + GenAIClientOperationDurationName = "gen_ai.client.operation.duration" + GenAIClientOperationDurationUnit = "s" + GenAIClientOperationDurationDescription = "GenAI operation duration" + // GenAIClientTokenUsage is the metric conforming to the + // "gen_ai.client.token.usage" semantic conventions. It represents the measures + // number of input and output tokens used. + // Instrument: histogram + // Unit: {token} + // Stability: development + GenAIClientTokenUsageName = "gen_ai.client.token.usage" + GenAIClientTokenUsageUnit = "{token}" + GenAIClientTokenUsageDescription = "Measures number of input and output tokens used" + // GenAIServerRequestDuration is the metric conforming to the + // "gen_ai.server.request.duration" semantic conventions. It represents the + // generative AI server request duration such as time-to-last byte or last + // output token. + // Instrument: histogram + // Unit: s + // Stability: development + GenAIServerRequestDurationName = "gen_ai.server.request.duration" + GenAIServerRequestDurationUnit = "s" + GenAIServerRequestDurationDescription = "Generative AI server request duration such as time-to-last byte or last output token" + // GenAIServerTimePerOutputToken is the metric conforming to the + // "gen_ai.server.time_per_output_token" semantic conventions. It represents + // the time per output token generated after the first token for successful + // responses. + // Instrument: histogram + // Unit: s + // Stability: development + GenAIServerTimePerOutputTokenName = "gen_ai.server.time_per_output_token" + GenAIServerTimePerOutputTokenUnit = "s" + GenAIServerTimePerOutputTokenDescription = "Time per output token generated after the first token for successful responses" + // GenAIServerTimeToFirstToken is the metric conforming to the + // "gen_ai.server.time_to_first_token" semantic conventions. It represents the + // time to generate first token for successful responses. + // Instrument: histogram + // Unit: s + // Stability: development + GenAIServerTimeToFirstTokenName = "gen_ai.server.time_to_first_token" + GenAIServerTimeToFirstTokenUnit = "s" + GenAIServerTimeToFirstTokenDescription = "Time to generate first token for successful responses" + // GoConfigGogc is the metric conforming to the "go.config.gogc" semantic + // conventions. It represents the heap size target percentage configured by the + // user, otherwise 100. + // Instrument: updowncounter + // Unit: % + // Stability: development + GoConfigGogcName = "go.config.gogc" + GoConfigGogcUnit = "%" + GoConfigGogcDescription = "Heap size target percentage configured by the user, otherwise 100." + // GoGoroutineCount is the metric conforming to the "go.goroutine.count" + // semantic conventions. It represents the count of live goroutines. + // Instrument: updowncounter + // Unit: {goroutine} + // Stability: development + GoGoroutineCountName = "go.goroutine.count" + GoGoroutineCountUnit = "{goroutine}" + GoGoroutineCountDescription = "Count of live goroutines." + // GoMemoryAllocated is the metric conforming to the "go.memory.allocated" + // semantic conventions. It represents the memory allocated to the heap by the + // application. + // Instrument: counter + // Unit: By + // Stability: development + GoMemoryAllocatedName = "go.memory.allocated" + GoMemoryAllocatedUnit = "By" + GoMemoryAllocatedDescription = "Memory allocated to the heap by the application." + // GoMemoryAllocations is the metric conforming to the "go.memory.allocations" + // semantic conventions. It represents the count of allocations to the heap by + // the application. + // Instrument: counter + // Unit: {allocation} + // Stability: development + GoMemoryAllocationsName = "go.memory.allocations" + GoMemoryAllocationsUnit = "{allocation}" + GoMemoryAllocationsDescription = "Count of allocations to the heap by the application." + // GoMemoryGCGoal is the metric conforming to the "go.memory.gc.goal" semantic + // conventions. It represents the heap size target for the end of the GC cycle. + // Instrument: updowncounter + // Unit: By + // Stability: development + GoMemoryGCGoalName = "go.memory.gc.goal" + GoMemoryGCGoalUnit = "By" + GoMemoryGCGoalDescription = "Heap size target for the end of the GC cycle." + // GoMemoryLimit is the metric conforming to the "go.memory.limit" semantic + // conventions. It represents the go runtime memory limit configured by the + // user, if a limit exists. + // Instrument: updowncounter + // Unit: By + // Stability: development + GoMemoryLimitName = "go.memory.limit" + GoMemoryLimitUnit = "By" + GoMemoryLimitDescription = "Go runtime memory limit configured by the user, if a limit exists." + // GoMemoryUsed is the metric conforming to the "go.memory.used" semantic + // conventions. It represents the memory used by the Go runtime. + // Instrument: updowncounter + // Unit: By + // Stability: development + GoMemoryUsedName = "go.memory.used" + GoMemoryUsedUnit = "By" + GoMemoryUsedDescription = "Memory used by the Go runtime." + // GoProcessorLimit is the metric conforming to the "go.processor.limit" + // semantic conventions. It represents the number of OS threads that can + // execute user-level Go code simultaneously. + // Instrument: updowncounter + // Unit: {thread} + // Stability: development + GoProcessorLimitName = "go.processor.limit" + GoProcessorLimitUnit = "{thread}" + GoProcessorLimitDescription = "The number of OS threads that can execute user-level Go code simultaneously." + // GoScheduleDuration is the metric conforming to the "go.schedule.duration" + // semantic conventions. It represents the time goroutines have spent in the + // scheduler in a runnable state before actually running. + // Instrument: histogram + // Unit: s + // Stability: development + GoScheduleDurationName = "go.schedule.duration" + GoScheduleDurationUnit = "s" + GoScheduleDurationDescription = "The time goroutines have spent in the scheduler in a runnable state before actually running." + // HTTPClientActiveRequests is the metric conforming to the + // "http.client.active_requests" semantic conventions. It represents the number + // of active HTTP requests. + // Instrument: updowncounter + // Unit: {request} + // Stability: development + HTTPClientActiveRequestsName = "http.client.active_requests" + HTTPClientActiveRequestsUnit = "{request}" + HTTPClientActiveRequestsDescription = "Number of active HTTP requests." + // HTTPClientConnectionDuration is the metric conforming to the + // "http.client.connection.duration" semantic conventions. It represents the + // duration of the successfully established outbound HTTP connections. + // Instrument: histogram + // Unit: s + // Stability: development + HTTPClientConnectionDurationName = "http.client.connection.duration" + HTTPClientConnectionDurationUnit = "s" + HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." + // HTTPClientOpenConnections is the metric conforming to the + // "http.client.open_connections" semantic conventions. It represents the + // number of outbound HTTP connections that are currently active or idle on the + // client. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + HTTPClientOpenConnectionsName = "http.client.open_connections" + HTTPClientOpenConnectionsUnit = "{connection}" + HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." + // HTTPClientRequestBodySize is the metric conforming to the + // "http.client.request.body.size" semantic conventions. It represents the size + // of HTTP client request bodies. + // Instrument: histogram + // Unit: By + // Stability: development + HTTPClientRequestBodySizeName = "http.client.request.body.size" + HTTPClientRequestBodySizeUnit = "By" + HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." + // HTTPClientRequestDuration is the metric conforming to the + // "http.client.request.duration" semantic conventions. It represents the + // duration of HTTP client requests. + // Instrument: histogram + // Unit: s + // Stability: stable + HTTPClientRequestDurationName = "http.client.request.duration" + HTTPClientRequestDurationUnit = "s" + HTTPClientRequestDurationDescription = "Duration of HTTP client requests." + // HTTPClientResponseBodySize is the metric conforming to the + // "http.client.response.body.size" semantic conventions. It represents the + // size of HTTP client response bodies. + // Instrument: histogram + // Unit: By + // Stability: development + HTTPClientResponseBodySizeName = "http.client.response.body.size" + HTTPClientResponseBodySizeUnit = "By" + HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." + // HTTPServerActiveRequests is the metric conforming to the + // "http.server.active_requests" semantic conventions. It represents the number + // of active HTTP server requests. + // Instrument: updowncounter + // Unit: {request} + // Stability: development + HTTPServerActiveRequestsName = "http.server.active_requests" + HTTPServerActiveRequestsUnit = "{request}" + HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." + // HTTPServerRequestBodySize is the metric conforming to the + // "http.server.request.body.size" semantic conventions. It represents the size + // of HTTP server request bodies. + // Instrument: histogram + // Unit: By + // Stability: development + HTTPServerRequestBodySizeName = "http.server.request.body.size" + HTTPServerRequestBodySizeUnit = "By" + HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." + // HTTPServerRequestDuration is the metric conforming to the + // "http.server.request.duration" semantic conventions. It represents the + // duration of HTTP server requests. + // Instrument: histogram + // Unit: s + // Stability: stable + HTTPServerRequestDurationName = "http.server.request.duration" + HTTPServerRequestDurationUnit = "s" + HTTPServerRequestDurationDescription = "Duration of HTTP server requests." + // HTTPServerResponseBodySize is the metric conforming to the + // "http.server.response.body.size" semantic conventions. It represents the + // size of HTTP server response bodies. + // Instrument: histogram + // Unit: By + // Stability: development + HTTPServerResponseBodySizeName = "http.server.response.body.size" + HTTPServerResponseBodySizeUnit = "By" + HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." + // HwEnergy is the metric conforming to the "hw.energy" semantic conventions. + // It represents the energy consumed by the component. + // Instrument: counter + // Unit: J + // Stability: development + HwEnergyName = "hw.energy" + HwEnergyUnit = "J" + HwEnergyDescription = "Energy consumed by the component" + // HwErrors is the metric conforming to the "hw.errors" semantic conventions. + // It represents the number of errors encountered by the component. + // Instrument: counter + // Unit: {error} + // Stability: development + HwErrorsName = "hw.errors" + HwErrorsUnit = "{error}" + HwErrorsDescription = "Number of errors encountered by the component" + // HwPower is the metric conforming to the "hw.power" semantic conventions. It + // represents the instantaneous power consumed by the component. + // Instrument: gauge + // Unit: W + // Stability: development + HwPowerName = "hw.power" + HwPowerUnit = "W" + HwPowerDescription = "Instantaneous power consumed by the component" + // HwStatus is the metric conforming to the "hw.status" semantic conventions. + // It represents the operational status: `1` (true) or `0` (false) for each of + // the possible states. + // Instrument: updowncounter + // Unit: 1 + // Stability: development + HwStatusName = "hw.status" + HwStatusUnit = "1" + HwStatusDescription = "Operational status: `1` (true) or `0` (false) for each of the possible states" + // K8SCronJobActiveJobs is the metric conforming to the + // "k8s.cronjob.active_jobs" semantic conventions. It represents the number of + // actively running jobs for a cronjob. + // Instrument: updowncounter + // Unit: {job} + // Stability: development + K8SCronJobActiveJobsName = "k8s.cronjob.active_jobs" + K8SCronJobActiveJobsUnit = "{job}" + K8SCronJobActiveJobsDescription = "The number of actively running jobs for a cronjob" + // K8SDaemonSetCurrentScheduledNodes is the metric conforming to the + // "k8s.daemonset.current_scheduled_nodes" semantic conventions. It represents + // the number of nodes that are running at least 1 daemon pod and are supposed + // to run the daemon pod. + // Instrument: updowncounter + // Unit: {node} + // Stability: development + K8SDaemonSetCurrentScheduledNodesName = "k8s.daemonset.current_scheduled_nodes" + K8SDaemonSetCurrentScheduledNodesUnit = "{node}" + K8SDaemonSetCurrentScheduledNodesDescription = "Number of nodes that are running at least 1 daemon pod and are supposed to run the daemon pod" + // K8SDaemonSetDesiredScheduledNodes is the metric conforming to the + // "k8s.daemonset.desired_scheduled_nodes" semantic conventions. It represents + // the number of nodes that should be running the daemon pod (including nodes + // currently running the daemon pod). + // Instrument: updowncounter + // Unit: {node} + // Stability: development + K8SDaemonSetDesiredScheduledNodesName = "k8s.daemonset.desired_scheduled_nodes" + K8SDaemonSetDesiredScheduledNodesUnit = "{node}" + K8SDaemonSetDesiredScheduledNodesDescription = "Number of nodes that should be running the daemon pod (including nodes currently running the daemon pod)" + // K8SDaemonSetMisscheduledNodes is the metric conforming to the + // "k8s.daemonset.misscheduled_nodes" semantic conventions. It represents the + // number of nodes that are running the daemon pod, but are not supposed to run + // the daemon pod. + // Instrument: updowncounter + // Unit: {node} + // Stability: development + K8SDaemonSetMisscheduledNodesName = "k8s.daemonset.misscheduled_nodes" + K8SDaemonSetMisscheduledNodesUnit = "{node}" + K8SDaemonSetMisscheduledNodesDescription = "Number of nodes that are running the daemon pod, but are not supposed to run the daemon pod" + // K8SDaemonSetReadyNodes is the metric conforming to the + // "k8s.daemonset.ready_nodes" semantic conventions. It represents the number + // of nodes that should be running the daemon pod and have one or more of the + // daemon pod running and ready. + // Instrument: updowncounter + // Unit: {node} + // Stability: development + K8SDaemonSetReadyNodesName = "k8s.daemonset.ready_nodes" + K8SDaemonSetReadyNodesUnit = "{node}" + K8SDaemonSetReadyNodesDescription = "Number of nodes that should be running the daemon pod and have one or more of the daemon pod running and ready" + // K8SDeploymentAvailablePods is the metric conforming to the + // "k8s.deployment.available_pods" semantic conventions. It represents the + // total number of available replica pods (ready for at least minReadySeconds) + // targeted by this deployment. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SDeploymentAvailablePodsName = "k8s.deployment.available_pods" + K8SDeploymentAvailablePodsUnit = "{pod}" + K8SDeploymentAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this deployment" + // K8SDeploymentDesiredPods is the metric conforming to the + // "k8s.deployment.desired_pods" semantic conventions. It represents the number + // of desired replica pods in this deployment. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SDeploymentDesiredPodsName = "k8s.deployment.desired_pods" + K8SDeploymentDesiredPodsUnit = "{pod}" + K8SDeploymentDesiredPodsDescription = "Number of desired replica pods in this deployment" + // K8SHpaCurrentPods is the metric conforming to the "k8s.hpa.current_pods" + // semantic conventions. It represents the current number of replica pods + // managed by this horizontal pod autoscaler, as last seen by the autoscaler. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SHpaCurrentPodsName = "k8s.hpa.current_pods" + K8SHpaCurrentPodsUnit = "{pod}" + K8SHpaCurrentPodsDescription = "Current number of replica pods managed by this horizontal pod autoscaler, as last seen by the autoscaler" + // K8SHpaDesiredPods is the metric conforming to the "k8s.hpa.desired_pods" + // semantic conventions. It represents the desired number of replica pods + // managed by this horizontal pod autoscaler, as last calculated by the + // autoscaler. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SHpaDesiredPodsName = "k8s.hpa.desired_pods" + K8SHpaDesiredPodsUnit = "{pod}" + K8SHpaDesiredPodsDescription = "Desired number of replica pods managed by this horizontal pod autoscaler, as last calculated by the autoscaler" + // K8SHpaMaxPods is the metric conforming to the "k8s.hpa.max_pods" semantic + // conventions. It represents the upper limit for the number of replica pods to + // which the autoscaler can scale up. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SHpaMaxPodsName = "k8s.hpa.max_pods" + K8SHpaMaxPodsUnit = "{pod}" + K8SHpaMaxPodsDescription = "The upper limit for the number of replica pods to which the autoscaler can scale up" + // K8SHpaMinPods is the metric conforming to the "k8s.hpa.min_pods" semantic + // conventions. It represents the lower limit for the number of replica pods to + // which the autoscaler can scale down. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SHpaMinPodsName = "k8s.hpa.min_pods" + K8SHpaMinPodsUnit = "{pod}" + K8SHpaMinPodsDescription = "The lower limit for the number of replica pods to which the autoscaler can scale down" + // K8SJobActivePods is the metric conforming to the "k8s.job.active_pods" + // semantic conventions. It represents the number of pending and actively + // running pods for a job. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SJobActivePodsName = "k8s.job.active_pods" + K8SJobActivePodsUnit = "{pod}" + K8SJobActivePodsDescription = "The number of pending and actively running pods for a job" + // K8SJobDesiredSuccessfulPods is the metric conforming to the + // "k8s.job.desired_successful_pods" semantic conventions. It represents the + // desired number of successfully finished pods the job should be run with. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SJobDesiredSuccessfulPodsName = "k8s.job.desired_successful_pods" + K8SJobDesiredSuccessfulPodsUnit = "{pod}" + K8SJobDesiredSuccessfulPodsDescription = "The desired number of successfully finished pods the job should be run with" + // K8SJobFailedPods is the metric conforming to the "k8s.job.failed_pods" + // semantic conventions. It represents the number of pods which reached phase + // Failed for a job. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SJobFailedPodsName = "k8s.job.failed_pods" + K8SJobFailedPodsUnit = "{pod}" + K8SJobFailedPodsDescription = "The number of pods which reached phase Failed for a job" + // K8SJobMaxParallelPods is the metric conforming to the + // "k8s.job.max_parallel_pods" semantic conventions. It represents the max + // desired number of pods the job should run at any given time. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SJobMaxParallelPodsName = "k8s.job.max_parallel_pods" + K8SJobMaxParallelPodsUnit = "{pod}" + K8SJobMaxParallelPodsDescription = "The max desired number of pods the job should run at any given time" + // K8SJobSuccessfulPods is the metric conforming to the + // "k8s.job.successful_pods" semantic conventions. It represents the number of + // pods which reached phase Succeeded for a job. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SJobSuccessfulPodsName = "k8s.job.successful_pods" + K8SJobSuccessfulPodsUnit = "{pod}" + K8SJobSuccessfulPodsDescription = "The number of pods which reached phase Succeeded for a job" + // K8SNamespacePhase is the metric conforming to the "k8s.namespace.phase" + // semantic conventions. It represents the describes number of K8s namespaces + // that are currently in a given phase. + // Instrument: updowncounter + // Unit: {namespace} + // Stability: development + K8SNamespacePhaseName = "k8s.namespace.phase" + K8SNamespacePhaseUnit = "{namespace}" + K8SNamespacePhaseDescription = "Describes number of K8s namespaces that are currently in a given phase." + // K8SNodeCPUTime is the metric conforming to the "k8s.node.cpu.time" semantic + // conventions. It represents the total CPU time consumed. + // Instrument: counter + // Unit: s + // Stability: development + K8SNodeCPUTimeName = "k8s.node.cpu.time" + K8SNodeCPUTimeUnit = "s" + K8SNodeCPUTimeDescription = "Total CPU time consumed" + // K8SNodeCPUUsage is the metric conforming to the "k8s.node.cpu.usage" + // semantic conventions. It represents the node's CPU usage, measured in cpus. + // Range from 0 to the number of allocatable CPUs. + // Instrument: gauge + // Unit: {cpu} + // Stability: development + K8SNodeCPUUsageName = "k8s.node.cpu.usage" + K8SNodeCPUUsageUnit = "{cpu}" + K8SNodeCPUUsageDescription = "Node's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" + // K8SNodeMemoryUsage is the metric conforming to the "k8s.node.memory.usage" + // semantic conventions. It represents the memory usage of the Node. + // Instrument: gauge + // Unit: By + // Stability: development + K8SNodeMemoryUsageName = "k8s.node.memory.usage" + K8SNodeMemoryUsageUnit = "By" + K8SNodeMemoryUsageDescription = "Memory usage of the Node" + // K8SNodeNetworkErrors is the metric conforming to the + // "k8s.node.network.errors" semantic conventions. It represents the node + // network errors. + // Instrument: counter + // Unit: {error} + // Stability: development + K8SNodeNetworkErrorsName = "k8s.node.network.errors" + K8SNodeNetworkErrorsUnit = "{error}" + K8SNodeNetworkErrorsDescription = "Node network errors" + // K8SNodeNetworkIo is the metric conforming to the "k8s.node.network.io" + // semantic conventions. It represents the network bytes for the Node. + // Instrument: counter + // Unit: By + // Stability: development + K8SNodeNetworkIoName = "k8s.node.network.io" + K8SNodeNetworkIoUnit = "By" + K8SNodeNetworkIoDescription = "Network bytes for the Node" + // K8SNodeUptime is the metric conforming to the "k8s.node.uptime" semantic + // conventions. It represents the time the Node has been running. + // Instrument: gauge + // Unit: s + // Stability: development + K8SNodeUptimeName = "k8s.node.uptime" + K8SNodeUptimeUnit = "s" + K8SNodeUptimeDescription = "The time the Node has been running" + // K8SPodCPUTime is the metric conforming to the "k8s.pod.cpu.time" semantic + // conventions. It represents the total CPU time consumed. + // Instrument: counter + // Unit: s + // Stability: development + K8SPodCPUTimeName = "k8s.pod.cpu.time" + K8SPodCPUTimeUnit = "s" + K8SPodCPUTimeDescription = "Total CPU time consumed" + // K8SPodCPUUsage is the metric conforming to the "k8s.pod.cpu.usage" semantic + // conventions. It represents the pod's CPU usage, measured in cpus. Range from + // 0 to the number of allocatable CPUs. + // Instrument: gauge + // Unit: {cpu} + // Stability: development + K8SPodCPUUsageName = "k8s.pod.cpu.usage" + K8SPodCPUUsageUnit = "{cpu}" + K8SPodCPUUsageDescription = "Pod's CPU usage, measured in cpus. Range from 0 to the number of allocatable CPUs" + // K8SPodMemoryUsage is the metric conforming to the "k8s.pod.memory.usage" + // semantic conventions. It represents the memory usage of the Pod. + // Instrument: gauge + // Unit: By + // Stability: development + K8SPodMemoryUsageName = "k8s.pod.memory.usage" + K8SPodMemoryUsageUnit = "By" + K8SPodMemoryUsageDescription = "Memory usage of the Pod" + // K8SPodNetworkErrors is the metric conforming to the "k8s.pod.network.errors" + // semantic conventions. It represents the pod network errors. + // Instrument: counter + // Unit: {error} + // Stability: development + K8SPodNetworkErrorsName = "k8s.pod.network.errors" + K8SPodNetworkErrorsUnit = "{error}" + K8SPodNetworkErrorsDescription = "Pod network errors" + // K8SPodNetworkIo is the metric conforming to the "k8s.pod.network.io" + // semantic conventions. It represents the network bytes for the Pod. + // Instrument: counter + // Unit: By + // Stability: development + K8SPodNetworkIoName = "k8s.pod.network.io" + K8SPodNetworkIoUnit = "By" + K8SPodNetworkIoDescription = "Network bytes for the Pod" + // K8SPodUptime is the metric conforming to the "k8s.pod.uptime" semantic + // conventions. It represents the time the Pod has been running. + // Instrument: gauge + // Unit: s + // Stability: development + K8SPodUptimeName = "k8s.pod.uptime" + K8SPodUptimeUnit = "s" + K8SPodUptimeDescription = "The time the Pod has been running" + // K8SReplicaSetAvailablePods is the metric conforming to the + // "k8s.replicaset.available_pods" semantic conventions. It represents the + // total number of available replica pods (ready for at least minReadySeconds) + // targeted by this replicaset. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SReplicaSetAvailablePodsName = "k8s.replicaset.available_pods" + K8SReplicaSetAvailablePodsUnit = "{pod}" + K8SReplicaSetAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replicaset" + // K8SReplicaSetDesiredPods is the metric conforming to the + // "k8s.replicaset.desired_pods" semantic conventions. It represents the number + // of desired replica pods in this replicaset. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SReplicaSetDesiredPodsName = "k8s.replicaset.desired_pods" + K8SReplicaSetDesiredPodsUnit = "{pod}" + K8SReplicaSetDesiredPodsDescription = "Number of desired replica pods in this replicaset" + // K8SReplicationControllerAvailablePods is the metric conforming to the + // "k8s.replication_controller.available_pods" semantic conventions. It + // represents the total number of available replica pods (ready for at least + // minReadySeconds) targeted by this replication controller. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SReplicationControllerAvailablePodsName = "k8s.replication_controller.available_pods" + K8SReplicationControllerAvailablePodsUnit = "{pod}" + K8SReplicationControllerAvailablePodsDescription = "Total number of available replica pods (ready for at least minReadySeconds) targeted by this replication controller" + // K8SReplicationControllerDesiredPods is the metric conforming to the + // "k8s.replication_controller.desired_pods" semantic conventions. It + // represents the number of desired replica pods in this replication + // controller. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SReplicationControllerDesiredPodsName = "k8s.replication_controller.desired_pods" + K8SReplicationControllerDesiredPodsUnit = "{pod}" + K8SReplicationControllerDesiredPodsDescription = "Number of desired replica pods in this replication controller" + // K8SStatefulSetCurrentPods is the metric conforming to the + // "k8s.statefulset.current_pods" semantic conventions. It represents the + // number of replica pods created by the statefulset controller from the + // statefulset version indicated by currentRevision. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SStatefulSetCurrentPodsName = "k8s.statefulset.current_pods" + K8SStatefulSetCurrentPodsUnit = "{pod}" + K8SStatefulSetCurrentPodsDescription = "The number of replica pods created by the statefulset controller from the statefulset version indicated by currentRevision" + // K8SStatefulSetDesiredPods is the metric conforming to the + // "k8s.statefulset.desired_pods" semantic conventions. It represents the + // number of desired replica pods in this statefulset. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SStatefulSetDesiredPodsName = "k8s.statefulset.desired_pods" + K8SStatefulSetDesiredPodsUnit = "{pod}" + K8SStatefulSetDesiredPodsDescription = "Number of desired replica pods in this statefulset" + // K8SStatefulSetReadyPods is the metric conforming to the + // "k8s.statefulset.ready_pods" semantic conventions. It represents the number + // of replica pods created for this statefulset with a Ready Condition. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SStatefulSetReadyPodsName = "k8s.statefulset.ready_pods" + K8SStatefulSetReadyPodsUnit = "{pod}" + K8SStatefulSetReadyPodsDescription = "The number of replica pods created for this statefulset with a Ready Condition" + // K8SStatefulSetUpdatedPods is the metric conforming to the + // "k8s.statefulset.updated_pods" semantic conventions. It represents the + // number of replica pods created by the statefulset controller from the + // statefulset version indicated by updateRevision. + // Instrument: updowncounter + // Unit: {pod} + // Stability: development + K8SStatefulSetUpdatedPodsName = "k8s.statefulset.updated_pods" + K8SStatefulSetUpdatedPodsUnit = "{pod}" + K8SStatefulSetUpdatedPodsDescription = "Number of replica pods created by the statefulset controller from the statefulset version indicated by updateRevision" + // KestrelActiveConnections is the metric conforming to the + // "kestrel.active_connections" semantic conventions. It represents the number + // of connections that are currently active on the server. + // Instrument: updowncounter + // Unit: {connection} + // Stability: stable + KestrelActiveConnectionsName = "kestrel.active_connections" + KestrelActiveConnectionsUnit = "{connection}" + KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." + // KestrelActiveTLSHandshakes is the metric conforming to the + // "kestrel.active_tls_handshakes" semantic conventions. It represents the + // number of TLS handshakes that are currently in progress on the server. + // Instrument: updowncounter + // Unit: {handshake} + // Stability: stable + KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" + KestrelActiveTLSHandshakesUnit = "{handshake}" + KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." + // KestrelConnectionDuration is the metric conforming to the + // "kestrel.connection.duration" semantic conventions. It represents the + // duration of connections on the server. + // Instrument: histogram + // Unit: s + // Stability: stable + KestrelConnectionDurationName = "kestrel.connection.duration" + KestrelConnectionDurationUnit = "s" + KestrelConnectionDurationDescription = "The duration of connections on the server." + // KestrelQueuedConnections is the metric conforming to the + // "kestrel.queued_connections" semantic conventions. It represents the number + // of connections that are currently queued and are waiting to start. + // Instrument: updowncounter + // Unit: {connection} + // Stability: stable + KestrelQueuedConnectionsName = "kestrel.queued_connections" + KestrelQueuedConnectionsUnit = "{connection}" + KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." + // KestrelQueuedRequests is the metric conforming to the + // "kestrel.queued_requests" semantic conventions. It represents the number of + // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are + // currently queued and are waiting to start. + // Instrument: updowncounter + // Unit: {request} + // Stability: stable + KestrelQueuedRequestsName = "kestrel.queued_requests" + KestrelQueuedRequestsUnit = "{request}" + KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." + // KestrelRejectedConnections is the metric conforming to the + // "kestrel.rejected_connections" semantic conventions. It represents the + // number of connections rejected by the server. + // Instrument: counter + // Unit: {connection} + // Stability: stable + KestrelRejectedConnectionsName = "kestrel.rejected_connections" + KestrelRejectedConnectionsUnit = "{connection}" + KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." + // KestrelTLSHandshakeDuration is the metric conforming to the + // "kestrel.tls_handshake.duration" semantic conventions. It represents the + // duration of TLS handshakes on the server. + // Instrument: histogram + // Unit: s + // Stability: stable + KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" + KestrelTLSHandshakeDurationUnit = "s" + KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." + // KestrelUpgradedConnections is the metric conforming to the + // "kestrel.upgraded_connections" semantic conventions. It represents the + // number of connections that are currently upgraded (WebSockets). . + // Instrument: updowncounter + // Unit: {connection} + // Stability: stable + KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" + KestrelUpgradedConnectionsUnit = "{connection}" + KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." + // MessagingClientConsumedMessages is the metric conforming to the + // "messaging.client.consumed.messages" semantic conventions. It represents the + // number of messages that were delivered to the application. + // Instrument: counter + // Unit: {message} + // Stability: development + MessagingClientConsumedMessagesName = "messaging.client.consumed.messages" + MessagingClientConsumedMessagesUnit = "{message}" + MessagingClientConsumedMessagesDescription = "Number of messages that were delivered to the application." + // MessagingClientOperationDuration is the metric conforming to the + // "messaging.client.operation.duration" semantic conventions. It represents + // the duration of messaging operation initiated by a producer or consumer + // client. + // Instrument: histogram + // Unit: s + // Stability: development + MessagingClientOperationDurationName = "messaging.client.operation.duration" + MessagingClientOperationDurationUnit = "s" + MessagingClientOperationDurationDescription = "Duration of messaging operation initiated by a producer or consumer client." + // MessagingClientPublishedMessages is the metric conforming to the + // "messaging.client.published.messages" semantic conventions. It represents + // the deprecated. Use `messaging.client.sent.messages` instead. + // Instrument: counter + // Unit: {message} + // Stability: development + // Deprecated: Replaced by `messaging.client.sent.messages`. + MessagingClientPublishedMessagesName = "messaging.client.published.messages" + MessagingClientPublishedMessagesUnit = "{message}" + MessagingClientPublishedMessagesDescription = "Deprecated. Use `messaging.client.sent.messages` instead." + // MessagingClientSentMessages is the metric conforming to the + // "messaging.client.sent.messages" semantic conventions. It represents the + // number of messages producer attempted to send to the broker. + // Instrument: counter + // Unit: {message} + // Stability: development + MessagingClientSentMessagesName = "messaging.client.sent.messages" + MessagingClientSentMessagesUnit = "{message}" + MessagingClientSentMessagesDescription = "Number of messages producer attempted to send to the broker." + // MessagingProcessDuration is the metric conforming to the + // "messaging.process.duration" semantic conventions. It represents the + // duration of processing operation. + // Instrument: histogram + // Unit: s + // Stability: development + MessagingProcessDurationName = "messaging.process.duration" + MessagingProcessDurationUnit = "s" + MessagingProcessDurationDescription = "Duration of processing operation." + // MessagingProcessMessages is the metric conforming to the + // "messaging.process.messages" semantic conventions. It represents the + // deprecated. Use `messaging.client.consumed.messages` instead. + // Instrument: counter + // Unit: {message} + // Stability: development + // Deprecated: Replaced by `messaging.client.consumed.messages`. + MessagingProcessMessagesName = "messaging.process.messages" + MessagingProcessMessagesUnit = "{message}" + MessagingProcessMessagesDescription = "Deprecated. Use `messaging.client.consumed.messages` instead." + // MessagingPublishDuration is the metric conforming to the + // "messaging.publish.duration" semantic conventions. It represents the + // deprecated. Use `messaging.client.operation.duration` instead. + // Instrument: histogram + // Unit: s + // Stability: development + // Deprecated: Replaced by `messaging.client.operation.duration`. + MessagingPublishDurationName = "messaging.publish.duration" + MessagingPublishDurationUnit = "s" + MessagingPublishDurationDescription = "Deprecated. Use `messaging.client.operation.duration` instead." + // MessagingPublishMessages is the metric conforming to the + // "messaging.publish.messages" semantic conventions. It represents the + // deprecated. Use `messaging.client.produced.messages` instead. + // Instrument: counter + // Unit: {message} + // Stability: development + // Deprecated: Replaced by `messaging.client.produced.messages`. + MessagingPublishMessagesName = "messaging.publish.messages" + MessagingPublishMessagesUnit = "{message}" + MessagingPublishMessagesDescription = "Deprecated. Use `messaging.client.produced.messages` instead." + // MessagingReceiveDuration is the metric conforming to the + // "messaging.receive.duration" semantic conventions. It represents the + // deprecated. Use `messaging.client.operation.duration` instead. + // Instrument: histogram + // Unit: s + // Stability: development + // Deprecated: Replaced by `messaging.client.operation.duration`. + MessagingReceiveDurationName = "messaging.receive.duration" + MessagingReceiveDurationUnit = "s" + MessagingReceiveDurationDescription = "Deprecated. Use `messaging.client.operation.duration` instead." + // MessagingReceiveMessages is the metric conforming to the + // "messaging.receive.messages" semantic conventions. It represents the + // deprecated. Use `messaging.client.consumed.messages` instead. + // Instrument: counter + // Unit: {message} + // Stability: development + // Deprecated: Replaced by `messaging.client.consumed.messages`. + MessagingReceiveMessagesName = "messaging.receive.messages" + MessagingReceiveMessagesUnit = "{message}" + MessagingReceiveMessagesDescription = "Deprecated. Use `messaging.client.consumed.messages` instead." + // ProcessContextSwitches is the metric conforming to the + // "process.context_switches" semantic conventions. It represents the number of + // times the process has been context switched. + // Instrument: counter + // Unit: {count} + // Stability: development + ProcessContextSwitchesName = "process.context_switches" + ProcessContextSwitchesUnit = "{count}" + ProcessContextSwitchesDescription = "Number of times the process has been context switched." + // ProcessCPUTime is the metric conforming to the "process.cpu.time" semantic + // conventions. It represents the total CPU seconds broken down by different + // states. + // Instrument: counter + // Unit: s + // Stability: development + ProcessCPUTimeName = "process.cpu.time" + ProcessCPUTimeUnit = "s" + ProcessCPUTimeDescription = "Total CPU seconds broken down by different states." + // ProcessCPUUtilization is the metric conforming to the + // "process.cpu.utilization" semantic conventions. It represents the difference + // in process.cpu.time since the last measurement, divided by the elapsed time + // and number of CPUs available to the process. + // Instrument: gauge + // Unit: 1 + // Stability: development + ProcessCPUUtilizationName = "process.cpu.utilization" + ProcessCPUUtilizationUnit = "1" + ProcessCPUUtilizationDescription = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process." + // ProcessDiskIo is the metric conforming to the "process.disk.io" semantic + // conventions. It represents the disk bytes transferred. + // Instrument: counter + // Unit: By + // Stability: development + ProcessDiskIoName = "process.disk.io" + ProcessDiskIoUnit = "By" + ProcessDiskIoDescription = "Disk bytes transferred." + // ProcessMemoryUsage is the metric conforming to the "process.memory.usage" + // semantic conventions. It represents the amount of physical memory in use. + // Instrument: updowncounter + // Unit: By + // Stability: development + ProcessMemoryUsageName = "process.memory.usage" + ProcessMemoryUsageUnit = "By" + ProcessMemoryUsageDescription = "The amount of physical memory in use." + // ProcessMemoryVirtual is the metric conforming to the + // "process.memory.virtual" semantic conventions. It represents the amount of + // committed virtual memory. + // Instrument: updowncounter + // Unit: By + // Stability: development + ProcessMemoryVirtualName = "process.memory.virtual" + ProcessMemoryVirtualUnit = "By" + ProcessMemoryVirtualDescription = "The amount of committed virtual memory." + // ProcessNetworkIo is the metric conforming to the "process.network.io" + // semantic conventions. It represents the network bytes transferred. + // Instrument: counter + // Unit: By + // Stability: development + ProcessNetworkIoName = "process.network.io" + ProcessNetworkIoUnit = "By" + ProcessNetworkIoDescription = "Network bytes transferred." + // ProcessOpenFileDescriptorCount is the metric conforming to the + // "process.open_file_descriptor.count" semantic conventions. It represents the + // number of file descriptors in use by the process. + // Instrument: updowncounter + // Unit: {count} + // Stability: development + ProcessOpenFileDescriptorCountName = "process.open_file_descriptor.count" + ProcessOpenFileDescriptorCountUnit = "{count}" + ProcessOpenFileDescriptorCountDescription = "Number of file descriptors in use by the process." + // ProcessPagingFaults is the metric conforming to the "process.paging.faults" + // semantic conventions. It represents the number of page faults the process + // has made. + // Instrument: counter + // Unit: {fault} + // Stability: development + ProcessPagingFaultsName = "process.paging.faults" + ProcessPagingFaultsUnit = "{fault}" + ProcessPagingFaultsDescription = "Number of page faults the process has made." + // ProcessThreadCount is the metric conforming to the "process.thread.count" + // semantic conventions. It represents the process threads count. + // Instrument: updowncounter + // Unit: {thread} + // Stability: development + ProcessThreadCountName = "process.thread.count" + ProcessThreadCountUnit = "{thread}" + ProcessThreadCountDescription = "Process threads count." + // ProcessUptime is the metric conforming to the "process.uptime" semantic + // conventions. It represents the time the process has been running. + // Instrument: gauge + // Unit: s + // Stability: development + ProcessUptimeName = "process.uptime" + ProcessUptimeUnit = "s" + ProcessUptimeDescription = "The time the process has been running." + // RPCClientDuration is the metric conforming to the "rpc.client.duration" + // semantic conventions. It represents the measures the duration of outbound + // RPC. + // Instrument: histogram + // Unit: ms + // Stability: development + RPCClientDurationName = "rpc.client.duration" + RPCClientDurationUnit = "ms" + RPCClientDurationDescription = "Measures the duration of outbound RPC." + // RPCClientRequestSize is the metric conforming to the + // "rpc.client.request.size" semantic conventions. It represents the measures + // the size of RPC request messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: development + RPCClientRequestSizeName = "rpc.client.request.size" + RPCClientRequestSizeUnit = "By" + RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." + // RPCClientRequestsPerRPC is the metric conforming to the + // "rpc.client.requests_per_rpc" semantic conventions. It represents the + // measures the number of messages received per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: development + RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" + RPCClientRequestsPerRPCUnit = "{count}" + RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." + // RPCClientResponseSize is the metric conforming to the + // "rpc.client.response.size" semantic conventions. It represents the measures + // the size of RPC response messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: development + RPCClientResponseSizeName = "rpc.client.response.size" + RPCClientResponseSizeUnit = "By" + RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." + // RPCClientResponsesPerRPC is the metric conforming to the + // "rpc.client.responses_per_rpc" semantic conventions. It represents the + // measures the number of messages sent per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: development + RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" + RPCClientResponsesPerRPCUnit = "{count}" + RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." + // RPCServerDuration is the metric conforming to the "rpc.server.duration" + // semantic conventions. It represents the measures the duration of inbound + // RPC. + // Instrument: histogram + // Unit: ms + // Stability: development + RPCServerDurationName = "rpc.server.duration" + RPCServerDurationUnit = "ms" + RPCServerDurationDescription = "Measures the duration of inbound RPC." + // RPCServerRequestSize is the metric conforming to the + // "rpc.server.request.size" semantic conventions. It represents the measures + // the size of RPC request messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: development + RPCServerRequestSizeName = "rpc.server.request.size" + RPCServerRequestSizeUnit = "By" + RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." + // RPCServerRequestsPerRPC is the metric conforming to the + // "rpc.server.requests_per_rpc" semantic conventions. It represents the + // measures the number of messages received per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: development + RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" + RPCServerRequestsPerRPCUnit = "{count}" + RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." + // RPCServerResponseSize is the metric conforming to the + // "rpc.server.response.size" semantic conventions. It represents the measures + // the size of RPC response messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: development + RPCServerResponseSizeName = "rpc.server.response.size" + RPCServerResponseSizeUnit = "By" + RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." + // RPCServerResponsesPerRPC is the metric conforming to the + // "rpc.server.responses_per_rpc" semantic conventions. It represents the + // measures the number of messages sent per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: development + RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" + RPCServerResponsesPerRPCUnit = "{count}" + RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." + // SignalrServerActiveConnections is the metric conforming to the + // "signalr.server.active_connections" semantic conventions. It represents the + // number of connections that are currently active on the server. + // Instrument: updowncounter + // Unit: {connection} + // Stability: stable + SignalrServerActiveConnectionsName = "signalr.server.active_connections" + SignalrServerActiveConnectionsUnit = "{connection}" + SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." + // SignalrServerConnectionDuration is the metric conforming to the + // "signalr.server.connection.duration" semantic conventions. It represents the + // duration of connections on the server. + // Instrument: histogram + // Unit: s + // Stability: stable + SignalrServerConnectionDurationName = "signalr.server.connection.duration" + SignalrServerConnectionDurationUnit = "s" + SignalrServerConnectionDurationDescription = "The duration of connections on the server." + // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" + // semantic conventions. It represents the reports the current frequency of the + // CPU in Hz. + // Instrument: gauge + // Unit: {Hz} + // Stability: development + SystemCPUFrequencyName = "system.cpu.frequency" + SystemCPUFrequencyUnit = "{Hz}" + SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" + // SystemCPULogicalCount is the metric conforming to the + // "system.cpu.logical.count" semantic conventions. It represents the reports + // the number of logical (virtual) processor cores created by the operating + // system to manage multitasking. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: development + SystemCPULogicalCountName = "system.cpu.logical.count" + SystemCPULogicalCountUnit = "{cpu}" + SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" + // SystemCPUPhysicalCount is the metric conforming to the + // "system.cpu.physical.count" semantic conventions. It represents the reports + // the number of actual physical processor cores on the hardware. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: development + SystemCPUPhysicalCountName = "system.cpu.physical.count" + SystemCPUPhysicalCountUnit = "{cpu}" + SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" + // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic + // conventions. It represents the seconds each logical CPU spent on each mode. + // Instrument: counter + // Unit: s + // Stability: development + SystemCPUTimeName = "system.cpu.time" + SystemCPUTimeUnit = "s" + SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" + // SystemCPUUtilization is the metric conforming to the + // "system.cpu.utilization" semantic conventions. It represents the difference + // in system.cpu.time since the last measurement, divided by the elapsed time + // and number of logical CPUs. + // Instrument: gauge + // Unit: 1 + // Stability: development + SystemCPUUtilizationName = "system.cpu.utilization" + SystemCPUUtilizationUnit = "1" + SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" + // SystemDiskIo is the metric conforming to the "system.disk.io" semantic + // conventions. + // Instrument: counter + // Unit: By + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskIoName = "system.disk.io" + SystemDiskIoUnit = "By" + // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" + // semantic conventions. It represents the time disk spent activated. + // Instrument: counter + // Unit: s + // Stability: development + SystemDiskIoTimeName = "system.disk.io_time" + SystemDiskIoTimeUnit = "s" + SystemDiskIoTimeDescription = "Time disk spent activated" + // SystemDiskLimit is the metric conforming to the "system.disk.limit" semantic + // conventions. It represents the total storage capacity of the disk. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemDiskLimitName = "system.disk.limit" + SystemDiskLimitUnit = "By" + SystemDiskLimitDescription = "The total storage capacity of the disk" + // SystemDiskMerged is the metric conforming to the "system.disk.merged" + // semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskMergedName = "system.disk.merged" + SystemDiskMergedUnit = "{operation}" + // SystemDiskOperationTime is the metric conforming to the + // "system.disk.operation_time" semantic conventions. It represents the sum of + // the time each operation took to complete. + // Instrument: counter + // Unit: s + // Stability: development + SystemDiskOperationTimeName = "system.disk.operation_time" + SystemDiskOperationTimeUnit = "s" + SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" + // SystemDiskOperations is the metric conforming to the + // "system.disk.operations" semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskOperationsName = "system.disk.operations" + SystemDiskOperationsUnit = "{operation}" + // SystemFilesystemLimit is the metric conforming to the + // "system.filesystem.limit" semantic conventions. It represents the total + // storage capacity of the filesystem. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemFilesystemLimitName = "system.filesystem.limit" + SystemFilesystemLimitUnit = "By" + SystemFilesystemLimitDescription = "The total storage capacity of the filesystem" + // SystemFilesystemUsage is the metric conforming to the + // "system.filesystem.usage" semantic conventions. It represents the reports a + // filesystem's space usage across different states. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemFilesystemUsageName = "system.filesystem.usage" + SystemFilesystemUsageUnit = "By" + SystemFilesystemUsageDescription = "Reports a filesystem's space usage across different states." + // SystemFilesystemUtilization is the metric conforming to the + // "system.filesystem.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemFilesystemUtilizationName = "system.filesystem.utilization" + SystemFilesystemUtilizationUnit = "1" + // SystemLinuxMemoryAvailable is the metric conforming to the + // "system.linux.memory.available" semantic conventions. It represents an + // estimate of how much memory is available for starting new applications, + // without causing swapping. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemLinuxMemoryAvailableName = "system.linux.memory.available" + SystemLinuxMemoryAvailableUnit = "By" + SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" + // SystemLinuxMemorySlabUsage is the metric conforming to the + // "system.linux.memory.slab.usage" semantic conventions. It represents the + // reports the memory used by the Linux kernel for managing caches of + // frequently used objects. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemLinuxMemorySlabUsageName = "system.linux.memory.slab.usage" + SystemLinuxMemorySlabUsageUnit = "By" + SystemLinuxMemorySlabUsageDescription = "Reports the memory used by the Linux kernel for managing caches of frequently used objects." + // SystemMemoryLimit is the metric conforming to the "system.memory.limit" + // semantic conventions. It represents the total memory available in the + // system. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemMemoryLimitName = "system.memory.limit" + SystemMemoryLimitUnit = "By" + SystemMemoryLimitDescription = "Total memory available in the system." + // SystemMemoryShared is the metric conforming to the "system.memory.shared" + // semantic conventions. It represents the shared memory used (mostly by + // tmpfs). + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemMemorySharedName = "system.memory.shared" + SystemMemorySharedUnit = "By" + SystemMemorySharedDescription = "Shared memory used (mostly by tmpfs)." + // SystemMemoryUsage is the metric conforming to the "system.memory.usage" + // semantic conventions. It represents the reports memory in use by state. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemMemoryUsageName = "system.memory.usage" + SystemMemoryUsageUnit = "By" + SystemMemoryUsageDescription = "Reports memory in use by state." + // SystemMemoryUtilization is the metric conforming to the + // "system.memory.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemMemoryUtilizationName = "system.memory.utilization" + SystemMemoryUtilizationUnit = "1" + // SystemNetworkConnections is the metric conforming to the + // "system.network.connections" semantic conventions. + // Instrument: updowncounter + // Unit: {connection} + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkConnectionsName = "system.network.connections" + SystemNetworkConnectionsUnit = "{connection}" + // SystemNetworkDropped is the metric conforming to the + // "system.network.dropped" semantic conventions. It represents the count of + // packets that are dropped or discarded even though there was no error. + // Instrument: counter + // Unit: {packet} + // Stability: development + SystemNetworkDroppedName = "system.network.dropped" + SystemNetworkDroppedUnit = "{packet}" + SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" + // SystemNetworkErrors is the metric conforming to the "system.network.errors" + // semantic conventions. It represents the count of network errors detected. + // Instrument: counter + // Unit: {error} + // Stability: development + SystemNetworkErrorsName = "system.network.errors" + SystemNetworkErrorsUnit = "{error}" + SystemNetworkErrorsDescription = "Count of network errors detected" + // SystemNetworkIo is the metric conforming to the "system.network.io" semantic + // conventions. + // Instrument: counter + // Unit: By + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkIoName = "system.network.io" + SystemNetworkIoUnit = "By" + // SystemNetworkPackets is the metric conforming to the + // "system.network.packets" semantic conventions. + // Instrument: counter + // Unit: {packet} + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkPacketsName = "system.network.packets" + SystemNetworkPacketsUnit = "{packet}" + // SystemPagingFaults is the metric conforming to the "system.paging.faults" + // semantic conventions. + // Instrument: counter + // Unit: {fault} + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingFaultsName = "system.paging.faults" + SystemPagingFaultsUnit = "{fault}" + // SystemPagingOperations is the metric conforming to the + // "system.paging.operations" semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingOperationsName = "system.paging.operations" + SystemPagingOperationsUnit = "{operation}" + // SystemPagingUsage is the metric conforming to the "system.paging.usage" + // semantic conventions. It represents the unix swap or windows pagefile usage. + // Instrument: updowncounter + // Unit: By + // Stability: development + SystemPagingUsageName = "system.paging.usage" + SystemPagingUsageUnit = "By" + SystemPagingUsageDescription = "Unix swap or windows pagefile usage" + // SystemPagingUtilization is the metric conforming to the + // "system.paging.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: development + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingUtilizationName = "system.paging.utilization" + SystemPagingUtilizationUnit = "1" + // SystemProcessCount is the metric conforming to the "system.process.count" + // semantic conventions. It represents the total number of processes in each + // state. + // Instrument: updowncounter + // Unit: {process} + // Stability: development + SystemProcessCountName = "system.process.count" + SystemProcessCountUnit = "{process}" + SystemProcessCountDescription = "Total number of processes in each state" + // SystemProcessCreated is the metric conforming to the + // "system.process.created" semantic conventions. It represents the total + // number of processes created over uptime of the host. + // Instrument: counter + // Unit: {process} + // Stability: development + SystemProcessCreatedName = "system.process.created" + SystemProcessCreatedUnit = "{process}" + SystemProcessCreatedDescription = "Total number of processes created over uptime of the host" + // SystemUptime is the metric conforming to the "system.uptime" semantic + // conventions. It represents the time the system has been running. + // Instrument: gauge + // Unit: s + // Stability: development + SystemUptimeName = "system.uptime" + SystemUptimeUnit = "s" + SystemUptimeDescription = "The time the system has been running" + // VCSChangeCount is the metric conforming to the "vcs.change.count" semantic + // conventions. It represents the number of changes (pull requests/merge + // requests/changelists) in a repository, categorized by their state (e.g. open + // or merged). + // Instrument: updowncounter + // Unit: {change} + // Stability: development + VCSChangeCountName = "vcs.change.count" + VCSChangeCountUnit = "{change}" + VCSChangeCountDescription = "The number of changes (pull requests/merge requests/changelists) in a repository, categorized by their state (e.g. open or merged)" + // VCSChangeDuration is the metric conforming to the "vcs.change.duration" + // semantic conventions. It represents the time duration a change (pull + // request/merge request/changelist) has been in a given state. + // Instrument: gauge + // Unit: s + // Stability: development + VCSChangeDurationName = "vcs.change.duration" + VCSChangeDurationUnit = "s" + VCSChangeDurationDescription = "The time duration a change (pull request/merge request/changelist) has been in a given state." + // VCSChangeTimeToApproval is the metric conforming to the + // "vcs.change.time_to_approval" semantic conventions. It represents the amount + // of time since its creation it took a change (pull request/merge + // request/changelist) to get the first approval. + // Instrument: gauge + // Unit: s + // Stability: development + VCSChangeTimeToApprovalName = "vcs.change.time_to_approval" + VCSChangeTimeToApprovalUnit = "s" + VCSChangeTimeToApprovalDescription = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get the first approval." + // VCSChangeTimeToMerge is the metric conforming to the + // "vcs.change.time_to_merge" semantic conventions. It represents the amount of + // time since its creation it took a change (pull request/merge + // request/changelist) to get merged into the target(base) ref. + // Instrument: gauge + // Unit: s + // Stability: development + VCSChangeTimeToMergeName = "vcs.change.time_to_merge" + VCSChangeTimeToMergeUnit = "s" + VCSChangeTimeToMergeDescription = "The amount of time since its creation it took a change (pull request/merge request/changelist) to get merged into the target(base) ref." + // VCSContributorCount is the metric conforming to the "vcs.contributor.count" + // semantic conventions. It represents the number of unique contributors to a + // repository. + // Instrument: gauge + // Unit: {contributor} + // Stability: development + VCSContributorCountName = "vcs.contributor.count" + VCSContributorCountUnit = "{contributor}" + VCSContributorCountDescription = "The number of unique contributors to a repository" + // VCSRefCount is the metric conforming to the "vcs.ref.count" semantic + // conventions. It represents the number of refs of type branch or tag in a + // repository. + // Instrument: updowncounter + // Unit: {ref} + // Stability: development + VCSRefCountName = "vcs.ref.count" + VCSRefCountUnit = "{ref}" + VCSRefCountDescription = "The number of refs of type branch or tag in a repository." + // VCSRefLinesDelta is the metric conforming to the "vcs.ref.lines_delta" + // semantic conventions. It represents the number of lines added/removed in a + // ref (branch) relative to the ref from the `vcs.ref.base.name` attribute. + // Instrument: gauge + // Unit: {line} + // Stability: development + VCSRefLinesDeltaName = "vcs.ref.lines_delta" + VCSRefLinesDeltaUnit = "{line}" + VCSRefLinesDeltaDescription = "The number of lines added/removed in a ref (branch) relative to the ref from the `vcs.ref.base.name` attribute." + // VCSRefRevisionsDelta is the metric conforming to the + // "vcs.ref.revisions_delta" semantic conventions. It represents the number of + // revisions (commits) a ref (branch) is ahead/behind the branch from the + // `vcs.ref.base.name` attribute. + // Instrument: gauge + // Unit: {revision} + // Stability: development + VCSRefRevisionsDeltaName = "vcs.ref.revisions_delta" + VCSRefRevisionsDeltaUnit = "{revision}" + VCSRefRevisionsDeltaDescription = "The number of revisions (commits) a ref (branch) is ahead/behind the branch from the `vcs.ref.base.name` attribute" + // VCSRefTime is the metric conforming to the "vcs.ref.time" semantic + // conventions. It represents the time a ref (branch) created from the default + // branch (trunk) has existed. The `ref.type` attribute will always be `branch` + // . + // Instrument: gauge + // Unit: s + // Stability: development + VCSRefTimeName = "vcs.ref.time" + VCSRefTimeUnit = "s" + VCSRefTimeDescription = "Time a ref (branch) created from the default branch (trunk) has existed. The `ref.type` attribute will always be `branch`" + // VCSRepositoryCount is the metric conforming to the "vcs.repository.count" + // semantic conventions. It represents the number of repositories in an + // organization. + // Instrument: updowncounter + // Unit: {repository} + // Stability: development + VCSRepositoryCountName = "vcs.repository.count" + VCSRepositoryCountUnit = "{repository}" + VCSRepositoryCountDescription = "The number of repositories in an organization." +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go index 5b56662573..0ca04d10f2 100644 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.34.0/attribute_group.go @@ -1370,9 +1370,11 @@ func AWSExtendedRequestID(val string) attribute.KeyValue { // AWSKinesisStreamName returns an attribute KeyValue conforming to the // "aws.kinesis.stream_name" semantic conventions. It represents the name of the // AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name` -// parameter of the Kinesis [describe-stream] operation. +// +// parameter of the Kinesis [describe-stream] operation. // // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html +// // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html func AWSKinesisStreamName(val string) attribute.KeyValue { return AWSKinesisStreamNameKey.String(val) @@ -1382,7 +1384,8 @@ func AWSKinesisStreamName(val string) attribute.KeyValue { // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked // ARN as provided on the `Context` passed to the function ( // `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` -// applicable). +// +// applicable). func AWSLambdaInvokedARN(val string) attribute.KeyValue { return AWSLambdaInvokedARNKey.String(val) } @@ -2561,7 +2564,8 @@ func CloudRegion(val string) attribute.KeyValue { // "cloud.resource_id" semantic conventions. It represents the cloud // provider-specific native identifier of the monitored cloud resource (e.g. an // [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name] -// on GCP). +// +// on GCP). // // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id @@ -13848,4 +13852,4 @@ func WebEngineName(val string) attribute.KeyValue { // engine. func WebEngineVersion(val string) attribute.KeyValue { return WebEngineVersionKey.String(val) -} \ No newline at end of file +} diff --git a/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go b/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go index b342a0a940..88c0593fbe 100644 --- a/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go +++ b/vendor/go.opentelemetry.io/proto/otlp/trace/v1/trace.pb.go @@ -42,7 +42,7 @@ const ( // a bit-mask. To extract the bit-field, for example, use an // expression like: // -// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) +// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) // // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. // 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/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/go.uber.org/mock/mockgen/archive.go b/vendor/go.uber.org/mock/mockgen/archive.go new file mode 100644 index 0000000000..bc80ad119b --- /dev/null +++ b/vendor/go.uber.org/mock/mockgen/archive.go @@ -0,0 +1,55 @@ +package main + +import ( + "fmt" + "go/token" + "go/types" + "os" + + "go.uber.org/mock/mockgen/model" + + "golang.org/x/tools/go/gcexportdata" +) + +func archiveMode(importPath string, symbols []string, archive string) (*model.Package, error) { + f, err := os.Open(archive) + if err != nil { + return nil, err + } + defer f.Close() + r, err := gcexportdata.NewReader(f) + if err != nil { + return nil, fmt.Errorf("read export data %q: %v", archive, err) + } + + fset := token.NewFileSet() + imports := make(map[string]*types.Package) + tp, err := gcexportdata.Read(r, fset, imports, importPath) + if err != nil { + return nil, err + } + + pkg := &model.Package{ + Name: tp.Name(), + PkgPath: tp.Path(), + Interfaces: make([]*model.Interface, 0, len(symbols)), + } + for _, name := range symbols { + m := tp.Scope().Lookup(name) + tn, ok := m.(*types.TypeName) + if !ok { + continue + } + ti, ok := tn.Type().Underlying().(*types.Interface) + if !ok { + continue + } + it, err := model.InterfaceFromGoTypesType(ti) + if err != nil { + return nil, err + } + it.Name = m.Name() + pkg.Interfaces = append(pkg.Interfaces, it) + } + return pkg, nil +} diff --git a/vendor/go.uber.org/mock/mockgen/deprecated.go b/vendor/go.uber.org/mock/mockgen/deprecated.go new file mode 100644 index 0000000000..0b45a2e304 --- /dev/null +++ b/vendor/go.uber.org/mock/mockgen/deprecated.go @@ -0,0 +1,41 @@ +package main + +import ( + "flag" + "log" + "os" +) + +const ( + deprecatedFlagProgOnly = "prog_only" + deprecatedFlagExecOnly = "exec_only" +) + +var ( + _ = flag.Bool("prog_only", false, "DEPRECATED (reflect mode) Only generate the reflection program; write it to stdout and exit.") + _ = flag.String("exec_only", "", "DEPRECATED (reflect mode) If set, execute this reflection program.") +) + +// notifyAboutDeprecatedFlags prints a warning message for a deprecated flags if they are set. +func notifyAboutDeprecatedFlags() { + const resetColorPostfix = "\033[0m" + logger := initWarningLogger() + + flag.Visit(func(f *flag.Flag) { + switch f.Name { + case deprecatedFlagProgOnly: + logger.Println("The -prog_only flag is deprecated and has no effect.", resetColorPostfix) + case deprecatedFlagExecOnly: + logger.Println("The -exec_only flag is deprecated and has no effect.", resetColorPostfix) + } + }) +} + +func initWarningLogger() *log.Logger { + const ( + yellowColor = "\033[33m" + warningPrefix = yellowColor + "WARNING: " + ) + + return log.New(os.Stdout, warningPrefix, log.Ldate|log.Ltime) +} diff --git a/vendor/go.uber.org/mock/mockgen/generic.go b/vendor/go.uber.org/mock/mockgen/generic.go new file mode 100644 index 0000000000..c2289c2a88 --- /dev/null +++ b/vendor/go.uber.org/mock/mockgen/generic.go @@ -0,0 +1,103 @@ +// 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. + +package main + +import ( + "errors" + "fmt" + "go/ast" + "go/token" + + "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]model.Type) (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 (p *fileParser) parseGenericMethod(field *ast.Field, it *namedInterface, iface *model.Interface, pkg string, tps map[string]model.Type) ([]*model.Method, error) { + var indices []ast.Expr + var typ ast.Expr + switch v := field.Type.(type) { + case *ast.IndexExpr: + indices = []ast.Expr{v.Index} + typ = v.X + case *ast.IndexListExpr: + indices = v.Indices + typ = v.X + case *ast.UnaryExpr: + if v.Op == token.TILDE { + return nil, errConstraintInterface + } + return nil, fmt.Errorf("~T may only appear as constraint for %T", field.Type) + case *ast.BinaryExpr: + if v.Op == token.OR { + return nil, errConstraintInterface + } + return nil, fmt.Errorf("A|B may only appear as constraint for %T", field.Type) + default: + return nil, fmt.Errorf("don't know how to mock method of type %T", field.Type) + } + + nf := &ast.Field{ + Doc: field.Comment, + Names: field.Names, + Type: typ, + Tag: field.Tag, + Comment: field.Comment, + } + + it.embeddedInstTypeParams = indices + + return p.parseMethod(nf, it, iface, pkg, tps) +} + +var errConstraintInterface = errors.New("interface contains constraints") diff --git a/vendor/go.uber.org/mock/mockgen/gob.go b/vendor/go.uber.org/mock/mockgen/gob.go new file mode 100644 index 0000000000..b5ab066187 --- /dev/null +++ b/vendor/go.uber.org/mock/mockgen/gob.go @@ -0,0 +1,21 @@ +package main + +import ( + "encoding/gob" + "os" + + "go.uber.org/mock/mockgen/model" +) + +func gobMode(path string) (*model.Package, error) { + in, err := os.Open(path) + if err != nil { + return nil, err + } + defer in.Close() + var pkg model.Package + if err := gob.NewDecoder(in).Decode(&pkg); err != nil { + return nil, err + } + return &pkg, nil +} diff --git a/vendor/github.com/golang/mock/mockgen/mockgen.go b/vendor/go.uber.org/mock/mockgen/mockgen.go similarity index 55% rename from vendor/github.com/golang/mock/mockgen/mockgen.go rename to vendor/go.uber.org/mock/mockgen/mockgen.go index 50487070e3..d3d92ba16c 100644 --- a/vendor/github.com/golang/mock/mockgen/mockgen.go +++ b/vendor/go.uber.org/mock/mockgen/mockgen.go @@ -21,29 +21,30 @@ package main import ( "bytes" "encoding/json" + "errors" "flag" "fmt" "go/token" "io" - "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" + "runtime" "sort" "strconv" "strings" "unicode" - "github.com/golang/mock/mockgen/model" - "golang.org/x/mod/modfile" toolsimports "golang.org/x/tools/imports" + + "go.uber.org/mock/mockgen/model" ) const ( - gomockImportPath = "github.com/golang/mock/gomock" + gomockImportPath = "go.uber.org/mock/gomock" ) var ( @@ -53,22 +54,33 @@ var ( ) var ( - source = flag.String("source", "", "(source mode) Input Go source file; enables source mode.") - destination = flag.String("destination", "", "Output file; defaults to stdout.") - mockNames = flag.String("mock_names", "", "Comma-separated interfaceName=mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix.") - packageOut = flag.String("package", "", "Package of the generated code; defaults to the package of the input with a 'mock_' prefix.") - 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") - - debugParser = flag.Bool("debug_parser", false, "Print out parser results only.") - showVersion = flag.Bool("version", false, "Print version.") + archive = flag.String("archive", "", "(archive mode) Input Go archive file; enables archive mode.") + source = flag.String("source", "", "(source mode) Input Go source file; enables source mode.") + destination = flag.String("destination", "", "Output file; defaults to stdout.") + mockNames = flag.String("mock_names", "", "Comma-separated interfaceName=mockName pairs of explicit mock names to use. Mock names default to 'Mock'+ interfaceName suffix.") + packageOut = flag.String("package", "", "Package of the generated code; defaults to the package of the input with a 'mock_' prefix.") + 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.") + writeCmdComment = flag.Bool("write_command_comment", true, "Writes the command used as a comment if true.") + writePkgComment = flag.Bool("write_package_comment", true, "Writes package documentation comment (godoc) if true.") + writeSourceComment = flag.Bool("write_source_comment", true, "Writes original file (source mode) or interface names (package mode) comment if true.") + writeGenerateDirective = flag.Bool("write_generate_directive", false, "Add //go:generate directive to regenerate the mock") + copyrightFile = flag.String("copyright_file", "", "Copyright file used to add copyright header") + buildConstraint = flag.String("build_constraint", "", "If non-empty, added as //go:build ") + typed = flag.Bool("typed", false, "Generate Type-safe 'Return', 'Do', 'DoAndReturn' function") + imports = flag.String("imports", "", "(source mode) Comma-separated name=path pairs of explicit imports to use.") + auxFiles = flag.String("aux_files", "", "(source mode) Comma-separated pkg=path pairs of auxiliary Go source files.") + modelGob = flag.String("model_gob", "", "Skip package/source loading entirely and use the gob encoded model.Package at the given path") + excludeInterfaces = flag.String("exclude_interfaces", "", "Comma-separated names of interfaces to be excluded") + debugParser = flag.Bool("debug_parser", false, "Print out parser results only.") + showVersion = flag.Bool("version", false, "Print version.") ) func main() { flag.Usage = usage flag.Parse() + notifyAboutDeprecatedFlags() + if *showVersion { printVersion() return @@ -77,15 +89,24 @@ func main() { var pkg *model.Package var err error var packageName string - if *source != "" { + + // Switch between modes + switch { + case *modelGob != "": // gob mode + pkg, err = gobMode(*modelGob) + case *source != "": // source mode pkg, err = sourceMode(*source) - } else { - if flag.NArg() != 2 { - usage() - log.Fatal("Expected exactly two arguments") - } + case *archive != "": // archive mode + checkArgs() packageName = flag.Arg(0) interfaces := strings.Split(flag.Arg(1), ",") + pkg, err = archiveMode(packageName, interfaces, *archive) + + default: // package mode + checkArgs() + packageName = flag.Arg(0) + interfaces := strings.Split(flag.Arg(1), ",") + if packageName == "." { dir, err := os.Getwd() if err != nil { @@ -95,9 +116,12 @@ func main() { if err != nil { log.Fatalf("Parse package name failed: %v", err) } + } - pkg, err = reflectMode(packageName, interfaces) + parser := packageModeParser{} + pkg, err = parser.parsePackage(packageName, interfaces) } + if err != nil { log.Fatalf("Loading input failed: %v", err) } @@ -107,22 +131,9 @@ 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, + // pkg.Name in package mode is the base name of the import path, // which might have characters that are illegal to have in package names. outputPackageName = "mock_" + sanitize(pkg.Name) } @@ -148,9 +159,13 @@ func main() { } } - g := new(generator) + g := &generator{ + buildConstraint: *buildConstraint, + } if *source != "" { g.filename = *source + } else if *archive != "" { + g.filename = *archive } else { g.srcPackage = packageName g.srcInterfaces = flag.Arg(1) @@ -161,7 +176,7 @@ func main() { g.mockNames = parseMockNames(*mockNames) } if *copyrightFile != "" { - header, err := ioutil.ReadFile(*copyrightFile) + header, err := os.ReadFile(*copyrightFile) if err != nil { log.Fatalf("Failed reading copyright file: %v", err) } @@ -171,7 +186,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 := os.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.Equal(existing, output) { + 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) } } @@ -188,25 +223,58 @@ func parseMockNames(names string) map[string]string { return mocksMap } +func parseExcludeInterfaces(names string) map[string]struct{} { + splitNames := strings.Split(names, ",") + namesSet := make(map[string]struct{}, len(splitNames)) + for _, name := range splitNames { + if name == "" { + continue + } + + namesSet[name] = struct{}{} + } + + if len(namesSet) == 0 { + return nil + } + + return namesSet +} + +func checkArgs() { + if flag.NArg() != 2 { + usage() + log.Fatal("Expected exactly two arguments") + } +} + func usage() { _, _ = io.WriteString(os.Stderr, usageText) flag.PrintDefaults() } -const usageText = `mockgen has two modes of operation: source and reflect. +const usageText = `mockgen has three modes of operation: archive, source and package. Source mode generates mock interfaces from a source file. It is enabled by using the -source flag. Other flags that -may be useful in this mode are -imports and -aux_files. +may be useful in this mode are -imports, -aux_files and -exclude_interfaces. Example: mockgen -source=foo.go [other options] -Reflect mode generates mock interfaces by building a program -that uses reflection to understand interfaces. It is enabled -by passing two non-flag arguments: an import path, and a +Package mode works by specifying the package and interface names. +It is enabled by passing two non-flag arguments: an import path, and a comma-separated list of symbols. +You can use "." to refer to the current path's package. Example: mockgen database/sql/driver Conn,Driver + mockgen . SomeInterface + +Archive mode generates mock interfaces from a package archive +file (.a). It is enabled by using the -archive flag and two +non-flag arguments: an import path, and a comma-separated +list of symbols. +Example: + mockgen -archive=pkg.a database/sql/driver Conn,Driver ` @@ -218,12 +286,13 @@ type generator struct { destination string // may be empty srcPackage, srcInterfaces string // may be empty copyrightHeader string + buildConstraint string // may be empty packageMap map[string]string // map from import path to package name } -func (g *generator) p(format string, args ...interface{}) { - fmt.Fprintf(&g.buf, g.indent+format+"\n", args...) +func (g *generator) p(format string, args ...any) { + _, _ = fmt.Fprintf(&g.buf, g.indent+format+"\n", args...) } func (g *generator) in() { @@ -273,13 +342,32 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac g.p("") } + if g.buildConstraint != "" { + g.p("//go:build %s", g.buildConstraint) + // https://pkg.go.dev/cmd/go#hdr-Build_constraints:~:text=a%20build%20constraint%20should%20be%20followed%20by%20a%20blank%20line + g.p("") + } + g.p("// Code generated by MockGen. DO NOT EDIT.") - if g.filename != "" { - g.p("// Source: %v", g.filename) - } else { - g.p("// Source: %v (interfaces: %v)", g.srcPackage, g.srcInterfaces) + if *writeSourceComment { + if g.filename != "" { + g.p("// Source: %v", g.filename) + } else { + g.p("// Source: %v (interfaces: %v)", g.srcPackage, g.srcInterfaces) + } + } + if *writeCmdComment { + g.p("//") + g.p("// Generated by this command:") + g.p("//") + // only log the name of the executable, not the full path + name := filepath.Base(os.Args[0]) + if runtime.GOOS == "windows" { + name = strings.TrimSuffix(name, ".exe") + } + g.p("//\t%v", strings.Join(append([]string{name}, os.Args[1:]...), " ")) + g.p("//") } - g.p("") // Get all required imports, and generate unique names for them all. im := pkg.Imports() @@ -305,6 +393,16 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac packagesName := createPackageMap(sortedPaths) + definedImports := make(map[string]string, len(im)) + if *imports != "" { + for _, kv := range strings.Split(*imports, ",") { + eq := strings.Index(kv, "=") + if k, v := kv[:eq], kv[eq+1:]; k != "." { + definedImports[v] = k + } + } + } + g.packageMap = make(map[string]string, len(im)) localNames := make(map[string]bool, len(im)) for _, pth := range sortedPaths { @@ -316,11 +414,16 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac // Local names for an imported package can usually be the basename of the import path. // A couple of situations don't permit that, such as duplicate local names // (e.g. importing "html/template" and "text/template"), or where the basename is - // a keyword (e.g. "foo/case"). + // a keyword (e.g. "foo/case") or when defining a name for that by using the -imports flag. // try base0, base1, ... pkgName := base + + if _, ok := definedImports[pth]; ok { + pkgName = definedImports[pth] + } + i := 0 - for localNames[pkgName] || token.Lookup(pkgName).IsKeyword() { + for localNames[pkgName] || token.Lookup(pkgName).IsKeyword() || pkgName == "any" { pkgName = base + strconv.Itoa(i) i++ } @@ -334,6 +437,12 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac localNames[pkgName] = true } + // Ensure there is an empty line between “generated by” block and + // package documentation comments to follow the recommendations: + // https://go.dev/wiki/CodeReviewComments#package-comments + // That is, “generated by” should not be a package comment. + g.p("") + if *writePkgComment { g.p("// Package %v is a generated GoMock package.", outputPkgName) } @@ -353,6 +462,10 @@ func (g *generator) Generate(pkg *model.Package, outputPkgName string, outputPac g.out() g.p(")") + if *writeGenerateDirective { + g.p("//go:generate %v", strings.Join(os.Args, " ")) + } + for _, intf := range pkg.Interfaces { if err := g.GenerateMockInterface(intf, outputPackagePath); err != nil { return err @@ -371,32 +484,59 @@ 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.p("isgomock struct{}") 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 +544,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 +561,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, m, shortTp, typed) + if typed { + g.p("") + _ = g.GenerateMockReturnCallMethod(intf, m, pkgOverride, longTp, shortTp) + } } } @@ -446,9 +590,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 +611,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) @@ -477,11 +621,11 @@ func (g *generator) GenerateMockMethod(mockType string, m *model.Method, pkgOver callArgs = ", " + strings.Join(argNames, ", ") } } else { - // Non-trivial. The generated code must build a []interface{}, + // Non-trivial. The generated code must build a []any, // but the variadic argument may be any type. idVarArgs := ia.allocateIdentifier("varargs") idVArg := ia.allocateIdentifier("a") - g.p("%s := []interface{}{%s}", idVarArgs, strings.Join(argNames[:len(argNames)-1], ", ")) + g.p("%s := []any{%s}", idVarArgs, strings.Join(argNames[:len(argNames)-1], ", ")) g.p("for _, %s := range %s {", idVArg, argNames[len(argNames)-1]) g.in() g.p("%s = append(%s, %s)", idVarArgs, idVarArgs, idVArg) @@ -511,8 +655,9 @@ 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, m *model.Method, shortTp string, typed bool) error { + mockType := g.mockName(intf.Name) + argNames := g.getArgNames(m, true) var argString string if m.Variadic == nil { @@ -521,21 +666,26 @@ func (g *generator) GenerateMockRecorderMethod(mockType string, m *model.Method) argString = strings.Join(argNames[:len(argNames)-1], ", ") } if argString != "" { - argString += " interface{}" + argString += " any" } if m.Variadic != nil { if argString != "" { argString += ", " } - argString += fmt.Sprintf("%s ...interface{}", argNames[len(argNames)-1]) + argString += fmt.Sprintf("%s ...any", argNames[len(argNames)-1]) } ia := newIdentifierAllocator(argNames) 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, mockType, 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) @@ -551,42 +701,136 @@ func (g *generator) GenerateMockRecorderMethod(mockType string, m *model.Method) } else { // Hard: create a temporary slice. idVarArgs := ia.allocateIdentifier("varargs") - g.p("%s := append([]interface{}{%s}, %s...)", + g.p("%s := append([]any{%s}, %s...)", idVarArgs, strings.Join(argNames[:len(argNames)-1], ", "), argNames[len(argNames)-1]) 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}`, mockType, 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) getArgNames(m *model.Method) []string { - argNames := make([]string, len(m.In)) - for i, p := range m.In { +func (g *generator) GenerateMockReturnCallMethod(intf *model.Interface, m *model.Method, pkgOverride, longTp, shortTp string) error { + mockType := g.mockName(intf.Name) + 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 := mockType + m.Name + + g.p("// %s%sCall wrap *gomock.Call", mockType, m.Name) + g.p("type %s%sCall%s struct{", mockType, 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 +} + +// nameExistsAsPackage returns true if the name exists as a package name. +// This is used to avoid name collisions when generating mock method arguments. +func (g *generator) nameExistsAsPackage(name string) bool { + for _, symbolName := range g.packageMap { + if symbolName == name { + return true + } + } + return false +} + +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 == "_" { + + if name == "" || name == "_" || g.nameExistsAsPackage(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)) + + if name == "" || g.nameExistsAsPackage(name) { + 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 { @@ -634,7 +878,7 @@ func createPackageMap(importPaths []string) map[string]string { } pkgMap := make(map[string]string) b := bytes.NewBuffer(nil) - args := []string{"list", "-json"} + args := []string{"list", "-json=ImportPath,Name"} args = append(args, importPaths...) cmd := exec.Command("go", args...) cmd.Stdout = b @@ -670,7 +914,7 @@ func parsePackageImport(srcDir string) (string, error) { if moduleMode != "off" { currentDir := srcDir for { - dat, err := ioutil.ReadFile(filepath.Join(currentDir, "go.mod")) + dat, err := os.ReadFile(filepath.Join(currentDir, "go.mod")) if os.IsNotExist(err) { if currentDir == filepath.Dir(currentDir) { // at the root diff --git a/vendor/github.com/golang/mock/mockgen/model/model.go b/vendor/go.uber.org/mock/mockgen/model/model.go similarity index 87% rename from vendor/github.com/golang/mock/mockgen/model/model.go rename to vendor/go.uber.org/mock/mockgen/model/model.go index 2c6a62ceb2..853dbf2d6b 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. @@ -143,12 +147,14 @@ type Type interface { } func init() { - gob.Register(&ArrayType{}) - gob.Register(&ChanType{}) - gob.Register(&FuncType{}) - gob.Register(&MapType{}) - gob.Register(&NamedType{}) - gob.Register(&PointerType{}) + // Call gob.RegisterName with pkgPath as prefix to avoid conflicting with + // github.com/golang/mock/mockgen/model 's registration. + gob.RegisterName(pkgPath+".ArrayType", &ArrayType{}) + gob.RegisterName(pkgPath+".ChanType", &ChanType{}) + gob.RegisterName(pkgPath+".FuncType", &FuncType{}) + gob.RegisterName(pkgPath+".MapType", &MapType{}) + gob.RegisterName(pkgPath+".NamedType", &NamedType{}) + gob.RegisterName(pkgPath+".PointerType", &PointerType{}) // Call gob.RegisterName to make sure it has the consistent name registered // for both gob decoder and encoder. @@ -156,7 +162,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 +265,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 +305,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 parameters 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 @@ -431,7 +469,7 @@ func typeFromType(t reflect.Type) (Type, error) { case reflect.Interface: // Two special interfaces. if t.NumMethod() == 0 { - return PredeclaredType("interface{}"), nil + return PredeclaredType("any"), nil } if t == errorType { return PredeclaredType("error"), nil diff --git a/vendor/go.uber.org/mock/mockgen/model/model_gotypes.go b/vendor/go.uber.org/mock/mockgen/model/model_gotypes.go new file mode 100644 index 0000000000..4596c3d28d --- /dev/null +++ b/vendor/go.uber.org/mock/mockgen/model/model_gotypes.go @@ -0,0 +1,160 @@ +package model + +import ( + "fmt" + "go/types" +) + +// InterfaceFromGoTypesType returns a pointer to an interface for the +// given interface type loaded from archive. +func InterfaceFromGoTypesType(it *types.Interface) (*Interface, error) { + intf := &Interface{} + + for i := 0; i < it.NumMethods(); i++ { + mt := it.Method(i) + // Skip unexported methods. + if !mt.Exported() { + continue + } + m := &Method{ + Name: mt.Name(), + } + + var err error + m.In, m.Variadic, m.Out, err = funcArgsFromGoTypesType(mt.Type().(*types.Signature)) + if err != nil { + return nil, fmt.Errorf("method %q: %w", mt.Name(), err) + } + + intf.AddMethod(m) + } + + return intf, nil +} + +func funcArgsFromGoTypesType(t *types.Signature) (in []*Parameter, variadic *Parameter, out []*Parameter, err error) { + nin := t.Params().Len() + if t.Variadic() { + nin-- + } + for i := 0; i < nin; i++ { + p, err := parameterFromGoTypesType(t.Params().At(i), false) + if err != nil { + return nil, nil, nil, err + } + in = append(in, p) + } + if t.Variadic() { + p, err := parameterFromGoTypesType(t.Params().At(nin), true) + if err != nil { + return nil, nil, nil, err + } + variadic = p + } + for i := 0; i < t.Results().Len(); i++ { + p, err := parameterFromGoTypesType(t.Results().At(i), false) + if err != nil { + return nil, nil, nil, err + } + out = append(out, p) + } + return +} + +func parameterFromGoTypesType(v *types.Var, variadic bool) (*Parameter, error) { + t := v.Type() + if variadic { + t = t.(*types.Slice).Elem() + } + tt, err := typeFromGoTypesType(t) + if err != nil { + return nil, err + } + return &Parameter{Name: v.Name(), Type: tt}, nil +} + +func typeFromGoTypesType(t types.Type) (Type, error) { + if t, ok := t.(*types.Named); ok { + tn := t.Obj() + if tn.Pkg() == nil { + return PredeclaredType(tn.Name()), nil + } + return &NamedType{ + Package: tn.Pkg().Path(), + Type: tn.Name(), + }, nil + } + + // only unnamed or predeclared types after here + + // Lots of types have element types. Let's do the parsing and error checking for all of them. + var elemType Type + if t, ok := t.(interface{ Elem() types.Type }); ok { + var err error + elemType, err = typeFromGoTypesType(t.Elem()) + if err != nil { + return nil, err + } + } + + switch t := t.(type) { + case *types.Array: + return &ArrayType{ + Len: int(t.Len()), + Type: elemType, + }, nil + case *types.Basic: + return PredeclaredType(t.String()), nil + case *types.Chan: + var dir ChanDir + switch t.Dir() { + case types.RecvOnly: + dir = RecvDir + case types.SendOnly: + dir = SendDir + } + return &ChanType{ + Dir: dir, + Type: elemType, + }, nil + case *types.Signature: + in, variadic, out, err := funcArgsFromGoTypesType(t) + if err != nil { + return nil, err + } + return &FuncType{ + In: in, + Out: out, + Variadic: variadic, + }, nil + case *types.Interface: + if t.NumMethods() == 0 { + return PredeclaredType("interface{}"), nil + } + case *types.Map: + kt, err := typeFromGoTypesType(t.Key()) + if err != nil { + return nil, err + } + return &MapType{ + Key: kt, + Value: elemType, + }, nil + case *types.Pointer: + return &PointerType{ + Type: elemType, + }, nil + case *types.Slice: + return &ArrayType{ + Len: -1, + Type: elemType, + }, nil + case *types.Struct: + if t.NumFields() == 0 { + return PredeclaredType("struct{}"), nil + } + // TODO: UnsafePointer + } + + return nil, fmt.Errorf("can't yet turn %v (%T) into a model.Type", t.String(), t) +} diff --git a/vendor/go.uber.org/mock/mockgen/package_mode.go b/vendor/go.uber.org/mock/mockgen/package_mode.go new file mode 100644 index 0000000000..29fab7f8a5 --- /dev/null +++ b/vendor/go.uber.org/mock/mockgen/package_mode.go @@ -0,0 +1,359 @@ +package main + +import ( + "errors" + "flag" + "fmt" + "go/types" + "strings" + + "go.uber.org/mock/mockgen/model" + "golang.org/x/tools/go/packages" +) + +var ( + buildFlags = flag.String("build_flags", "", "(package mode) Additional flags for go build.") +) + +type packageModeParser struct { + pkgName string +} + +func (p *packageModeParser) parsePackage(packageName string, ifaces []string) (*model.Package, error) { + p.pkgName = packageName + + pkg, err := p.loadPackage(packageName) + if err != nil { + return nil, fmt.Errorf("load package: %w", err) + } + + interfaces, err := p.extractInterfacesFromPackage(pkg, ifaces) + if err != nil { + return nil, fmt.Errorf("extract interfaces from package: %w", err) + } + + return &model.Package{ + Name: pkg.Types.Name(), + PkgPath: packageName, + Interfaces: interfaces, + }, nil +} + +func (p *packageModeParser) loadPackage(packageName string) (*packages.Package, error) { + var buildFlagsSet []string + if *buildFlags != "" { + buildFlagsSet = strings.Split(*buildFlags, " ") + } + + cfg := &packages.Config{ + Mode: packages.NeedDeps | packages.NeedImports | packages.NeedTypes | packages.NeedTypesInfo | packages.NeedEmbedFiles | packages.LoadSyntax, + BuildFlags: buildFlagsSet, + } + pkgs, err := packages.Load(cfg, packageName) + if err != nil { + return nil, fmt.Errorf("load packages: %w", err) + } + + if len(pkgs) != 1 { + return nil, fmt.Errorf("packages length must be 1: %d", len(pkgs)) + } + + if len(pkgs[0].Errors) > 0 { + errs := make([]error, len(pkgs[0].Errors)) + for i, err := range pkgs[0].Errors { + errs[i] = err + } + + return nil, errors.Join(errs...) + } + + return pkgs[0], nil +} + +func (p *packageModeParser) extractInterfacesFromPackage(pkg *packages.Package, ifaces []string) ([]*model.Interface, error) { + interfaces := make([]*model.Interface, len(ifaces)) + for i, iface := range ifaces { + obj := pkg.Types.Scope().Lookup(iface) + if obj == nil { + return nil, fmt.Errorf("interface %s does not exist", iface) + } + + modelIface, err := p.parseInterface(obj) + if err != nil { + return nil, newParseTypeError("parse interface", obj.Name(), err) + } + + interfaces[i] = modelIface + } + + return interfaces, nil +} + +func (p *packageModeParser) parseInterface(obj types.Object) (*model.Interface, error) { + named, ok := types.Unalias(obj.Type()).(*types.Named) + if !ok { + return nil, fmt.Errorf("%s is not an interface. it is a %T", obj.Name(), obj.Type().Underlying()) + } + + iface, ok := named.Underlying().(*types.Interface) + if !ok { + return nil, fmt.Errorf("%s is not an interface. it is a %T", obj.Name(), obj.Type().Underlying()) + } + + if p.isConstraint(iface) { + return nil, fmt.Errorf("interface %s is a constraint", obj.Name()) + } + + methods := make([]*model.Method, iface.NumMethods()) + for i := range iface.NumMethods() { + method := iface.Method(i) + typedMethod, ok := method.Type().(*types.Signature) + if !ok { + return nil, fmt.Errorf("method %s is not a signature", method.Name()) + } + + modelFunc, err := p.parseFunc(typedMethod) + if err != nil { + return nil, newParseTypeError("parse method", typedMethod.String(), err) + } + + methods[i] = &model.Method{ + Name: method.Name(), + In: modelFunc.In, + Out: modelFunc.Out, + Variadic: modelFunc.Variadic, + } + } + + if named.TypeParams() == nil { + return &model.Interface{Name: obj.Name(), Methods: methods}, nil + } + + typeParams := make([]*model.Parameter, named.TypeParams().Len()) + for i := range named.TypeParams().Len() { + param := named.TypeParams().At(i) + typeParam, err := p.parseConstraint(param) + if err != nil { + return nil, newParseTypeError("parse type parameter", param.String(), err) + } + + typeParams[i] = &model.Parameter{Name: param.Obj().Name(), Type: typeParam} + } + + return &model.Interface{Name: obj.Name(), Methods: methods, TypeParams: typeParams}, nil +} + +func (o *packageModeParser) isConstraint(t *types.Interface) bool { + for i := range t.NumEmbeddeds() { + embed := t.EmbeddedType(i) + if _, ok := embed.Underlying().(*types.Interface); !ok { + return true + } + } + + return false +} + +func (p *packageModeParser) parseType(t types.Type) (model.Type, error) { + switch t := t.(type) { + case *types.Array: + elementType, err := p.parseType(t.Elem()) + if err != nil { + return nil, newParseTypeError("parse array type", t.Elem().String(), err) + } + return &model.ArrayType{Len: int(t.Len()), Type: elementType}, nil + case *types.Slice: + elementType, err := p.parseType(t.Elem()) + if err != nil { + return nil, newParseTypeError("parse slice type", t.Elem().String(), err) + } + + return &model.ArrayType{Len: -1, Type: elementType}, nil + case *types.Chan: + var dir model.ChanDir + switch t.Dir() { + case types.RecvOnly: + dir = model.RecvDir + case types.SendOnly: + dir = model.SendDir + } + + chanType, err := p.parseType(t.Elem()) + if err != nil { + return nil, newParseTypeError("parse chan type", t.Elem().String(), err) + } + + return &model.ChanType{Dir: dir, Type: chanType}, nil + case *types.Signature: + sig, err := p.parseFunc(t) + if err != nil { + return nil, newParseTypeError("parse signature", t.String(), err) + } + + return sig, nil + case *types.Named, *types.Alias: + object := t.(interface{ Obj() *types.TypeName }) + name := object.Obj().Name() + var pkg string + if object.Obj().Pkg() != nil { + pkg = object.Obj().Pkg().Path() + } + + // TypeArgs method not available for aliases in go1.22 + genericType, ok := t.(interface{ TypeArgs() *types.TypeList }) + if !ok || genericType.TypeArgs() == nil { + return &model.NamedType{ + Package: pkg, + Type: name, + }, nil + } + + typeParams := &model.TypeParametersType{TypeParameters: make([]model.Type, genericType.TypeArgs().Len())} + for i := range genericType.TypeArgs().Len() { + typeParam := genericType.TypeArgs().At(i) + typedParam, err := p.parseType(typeParam) + if err != nil { + return nil, newParseTypeError("parse type parameter", typeParam.String(), err) + } + + typeParams.TypeParameters[i] = typedParam + } + + return &model.NamedType{ + Package: pkg, + Type: name, + TypeParams: typeParams, + }, nil + case *types.Interface: + if t.Empty() { + return model.PredeclaredType("any"), nil + } + + return nil, fmt.Errorf("cannot handle non-empty unnamed interfaces") + case *types.Map: + key, err := p.parseType(t.Key()) + if err != nil { + return nil, newParseTypeError("parse map key", t.Key().String(), err) + } + value, err := p.parseType(t.Elem()) + if err != nil { + return nil, newParseTypeError("parse map value", t.Elem().String(), err) + } + + return &model.MapType{Key: key, Value: value}, nil + case *types.Pointer: + valueType, err := p.parseType(t.Elem()) + if err != nil { + return nil, newParseTypeError("parse pointer type", t.Elem().String(), err) + } + + return &model.PointerType{Type: valueType}, nil + case *types.Struct: + if t.NumFields() > 0 { + return nil, fmt.Errorf("cannot handle non-empty unnamed structs") + } + + return model.PredeclaredType("struct{}"), nil + case *types.Basic: + return model.PredeclaredType(t.Name()), nil + case *types.Tuple: + panic("tuple field") // TODO + case *types.TypeParam: + return &model.NamedType{Type: t.Obj().Name()}, nil + default: + panic("unknown type") // TODO + } +} + +func (p *packageModeParser) parseFunc(sig *types.Signature) (*model.FuncType, error) { + var variadic *model.Parameter + params := make([]*model.Parameter, 0, sig.Params().Len()) + for i := range sig.Params().Len() { + param := sig.Params().At(i) + + isVariadicParam := i == sig.Params().Len()-1 && sig.Variadic() + parseType := param.Type() + if isVariadicParam { + sliceType, ok := param.Type().(*types.Slice) + if !ok { + return nil, newParseTypeError("variadic parameter is not a slice", param.String(), nil) + } + + parseType = sliceType.Elem() + } + + paramType, err := p.parseType(parseType) + if err != nil { + return nil, newParseTypeError("parse parameter type", parseType.String(), err) + } + + modelParameter := &model.Parameter{Type: paramType, Name: param.Name()} + + if isVariadicParam { + variadic = modelParameter + } else { + params = append(params, modelParameter) + } + } + + if len(params) == 0 { + params = nil + } + + results := make([]*model.Parameter, sig.Results().Len()) + for i := range sig.Results().Len() { + result := sig.Results().At(i) + + resultType, err := p.parseType(result.Type()) + if err != nil { + return nil, newParseTypeError("parse result type", result.Type().String(), err) + } + + results[i] = &model.Parameter{Type: resultType, Name: result.Name()} + } + + if len(results) == 0 { + results = nil + } + + return &model.FuncType{ + In: params, + Out: results, + Variadic: variadic, + }, nil +} + +func (p *packageModeParser) parseConstraint(t *types.TypeParam) (model.Type, error) { + if t == nil { + return nil, fmt.Errorf("nil type param") + } + + typeParam, err := p.parseType(t.Constraint()) + if err != nil { + return nil, newParseTypeError("parse constraint type", t.Constraint().String(), err) + } + + return typeParam, nil +} + +type parseTypeError struct { + message string + typeString string + error error +} + +func newParseTypeError(message string, typeString string, error error) *parseTypeError { + return &parseTypeError{typeString: typeString, error: error, message: message} +} + +func (p parseTypeError) Error() string { + if p.error != nil { + return fmt.Sprintf("%s: error parsing %s: %s", p.message, p.typeString, p.error) + } + + return fmt.Sprintf("%s: error parsing type %s", p.message, p.typeString) +} + +func (p parseTypeError) Unwrap() error { + return p.error +} diff --git a/vendor/github.com/golang/mock/mockgen/parse.go b/vendor/go.uber.org/mock/mockgen/parse.go similarity index 63% rename from vendor/github.com/golang/mock/mockgen/parse.go rename to vendor/go.uber.org/mock/mockgen/parse.go index bf6902cd5b..f43321c331 100644 --- a/vendor/github.com/golang/mock/mockgen/parse.go +++ b/vendor/go.uber.org/mock/mockgen/parse.go @@ -18,7 +18,6 @@ package main import ( "errors" - "flag" "fmt" "go/ast" "go/build" @@ -26,19 +25,14 @@ import ( "go/parser" "go/token" "go/types" - "io/ioutil" "log" + "os" "path" "path/filepath" "strconv" "strings" - "github.com/golang/mock/mockgen/model" -) - -var ( - imports = flag.String("imports", "", "(source mode) Comma-separated name=path pairs of explicit imports to use.") - auxFiles = flag.String("aux_files", "", "(source mode) Comma-separated pkg=path pairs of auxiliary Go source files.") + "go.uber.org/mock/mockgen/model" ) // sourceMode generates mocks via source file. @@ -62,8 +56,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, } @@ -81,6 +75,10 @@ func sourceMode(source string) (*model.Package, error) { } } + if *excludeInterfaces != "" { + p.excludeNamesSet = parseExcludeInterfaces(*excludeInterfaces) + } + // Handle -aux_files. if err := p.parseAuxFiles(*auxFiles); err != nil { return nil, err @@ -127,21 +125,55 @@ 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), + } +} + +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] +} - auxFiles []*ast.File - auxInterfaces map[string]map[string]*ast.InterfaceType // package (or "") => name => interface +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 + excludeNamesSet map[string]struct{} } -func (p *fileParser) errorf(pos token.Pos, format string, args ...interface{}) error { +func (p *fileParser) errorf(pos token.Pos, format string, args ...any) error { ps := p.fileSet.Position(pos) format = "%s:%d:%d: " + format - args = append([]interface{}{ps.Filename, ps.Line, ps.Column}, args...) + args = append([]any{ps.Filename, ps.Line, ps.Column}, args...) return fmt.Errorf(format, args...) } @@ -168,11 +200,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 +228,13 @@ 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) + if _, ok := p.excludeNamesSet[ni.name.String()]; ok { + continue + } + i, err := p.parseInterface(ni.name.String(), importPath, ni) + if errors.Is(err, errConstraintInterface) { + continue + } if err != nil { return nil, err } @@ -219,8 +254,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 +268,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 +279,77 @@ 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) constructInstParams(pkg string, params []*ast.Field, instParams []model.Type, embeddedInstParams []ast.Expr, tps map[string]model.Type) ([]model.Type, error) { + pm := make(map[string]int) + var i int + for _, v := range params { + for _, n := range v.Names { + pm[n.Name] = i + instParams = append(instParams, model.PredeclaredType(n.Name)) + i++ + } + } + + var runtimeInstParams []model.Type + for _, instParam := range embeddedInstParams { + switch t := instParam.(type) { + case *ast.Ident: + if idx, ok := pm[t.Name]; ok { + runtimeInstParams = append(runtimeInstParams, instParams[idx]) + continue + } + } + modelType, err := p.parseType(pkg, instParam, tps) + if err != nil { + return nil, err + } + runtimeInstParams = append(runtimeInstParams, modelType) + } + + return runtimeInstParams, nil +} + +func (p *fileParser) constructTps(it *namedInterface) (tps map[string]model.Type) { + tps = make(map[string]model.Type) + n := 0 + for _, tp := range it.typeParams { + for _, tm := range tp.Names { + tps[tm.Name] = nil + if len(it.instTypes) != 0 { + tps[tm.Name] = it.instTypes[n] + n++ + } + } + } + return tps +} + +// parseInterface loads interface specified by pkg and name, parses it and returns +// a new model with the parsed. +func (p *fileParser) parseInterface(name, pkg string, it *namedInterface) (*model.Interface, error) { iface := &model.Interface{Name: name} - for _, field := range it.Methods.List { + tps := p.constructTps(it) + 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 _, field := range it.it.Methods.List { + var methods []*model.Method + if methods, err = p.parseMethod(field, it, iface, pkg, tps); err != nil { + return nil, err + } + for _, m := range methods { + iface.AddMethod(m) + } + } + return iface, nil +} + +func (p *fileParser) parseMethod(field *ast.Field, it *namedInterface, iface *model.Interface, pkg string, tps map[string]model.Type) ([]*model.Method, error) { + // {} for git diff + { switch v := field.Type.(type) { case *ast.FuncType: if nn := len(field.Names); nn != 1 { @@ -259,37 +359,55 @@ 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) + return []*model.Method{m}, nil 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 if embeddedIfaceType != nil { var err error + embeddedIfaceType.instTypes, err = p.constructInstParams(pkg, it.typeParams, it.instTypes, it.embeddedInstTypeParams, tps) + if err != nil { + return nil, err + } embeddedIface, err = p.parseInterface(v.String(), pkg, embeddedIfaceType) if err != nil { return nil, err } + } else { // This is built-in error interface. 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()) + } + + embeddedIfaceType.instTypes, err = p.constructInstParams(pkg, it.typeParams, it.instTypes, it.embeddedInstTypeParams, tps) + if err != nil { + return nil, err + } + embeddedIface, err = ip.parseInterface(v.String(), pkg, embeddedIfaceType) + if err != nil { + return nil, err + } } } - // Copy the methods. - for _, m := range embeddedIface.Methods { - iface.AddMethod(m) - } + return embeddedIface.Methods, nil case *ast.SelectorExpr: // Embedded interface in another package. filePkg, sel := v.X.(*ast.Ident).String(), v.Sel.String() @@ -300,8 +418,12 @@ 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 { + embeddedIfaceType.instTypes, err = p.constructInstParams(pkg, it.typeParams, it.instTypes, it.embeddedInstTypeParams, tps) + if err != nil { + return nil, err + } embeddedIface, err = p.parseInterface(sel, filePkg, embeddedIfaceType) if err != nil { return nil, err @@ -320,46 +442,47 @@ 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) } + + embeddedIfaceType.instTypes, err = p.constructInstParams(pkg, it.typeParams, it.instTypes, it.embeddedInstTypeParams, tps) + if err != nil { + return nil, err + } embeddedIface, err = parser.parseInterface(sel, path, embeddedIfaceType) if err != nil { return nil, err } } - // Copy the methods. // TODO: apply shadowing rules. - for _, m := range embeddedIface.Methods { - iface.AddMethod(m) - } + return embeddedIface.Methods, nil default: - return nil, fmt.Errorf("don't know how to mock method of type %T", field.Type) + return p.parseGenericMethod(field, it, iface, pkg, tps) } } - 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]model.Type) (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 +490,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]model.Type) ([]*model.Parameter, error) { nf := 0 for _, f := range fields { nn := len(f.Names) @@ -382,7 +505,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 +524,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]model.Type) (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 +558,16 @@ 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() { + it, ok := tps[v.Name] + if v.IsExported() && !ok { // `pkg` may be an aliased imported pkg // if so, patch the import w/ the fully qualified import maybeImportedPkg, ok := p.imports[pkg] @@ -470,20 +577,22 @@ func (p *fileParser) parseType(pkg string, typ ast.Expr) (model.Type, error) { // assume type in this package return &model.NamedType{Package: pkg, Type: v.Name}, nil } - + if ok && it != nil { + return it, nil + } // assume predeclared type return model.PredeclaredType(v.Name), nil case *ast.InterfaceType: if v.Methods != nil && len(v.Methods.List) > 0 { return nil, p.errorf(v.Pos(), "can't handle non-empty unnamed interface types") } - return model.PredeclaredType("interface{}"), nil + return model.PredeclaredType("any"), 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 +605,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 +616,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 +733,16 @@ 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 + embeddedInstTypeParams []ast.Expr + instTypes []model.Type } // 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 +759,7 @@ func iterInterfaces(file *ast.File) <-chan namedInterface { continue } - ch <- namedInterface{ts.Name, it} + ch <- &namedInterface{name: ts.Name, it: it, typeParams: getTypeSpecTypeParams(ts)} } } close(ch) @@ -618,7 +779,7 @@ func isVariadic(f *ast.FuncType) bool { // packageNameOfDir get package import path via dir func packageNameOfDir(srcDir string) (string, error) { - files, err := ioutil.ReadDir(srcDir) + files, err := os.ReadDir(srcDir) if err != nil { log.Fatal(err) } 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 ad121ae63c..6db160ac28 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/go.yaml.in/yaml/v2/apic.go b/vendor/go.yaml.in/yaml/v2/apic.go index acf71402cf..fb2821e1e6 100644 --- a/vendor/go.yaml.in/yaml/v2/apic.go +++ b/vendor/go.yaml.in/yaml/v2/apic.go @@ -143,7 +143,7 @@ func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { emitter.canonical = canonical } -//// Set the indentation increment. +// // Set the indentation increment. func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { if indent < 2 || indent > 9 { indent = 2 diff --git a/vendor/go.yaml.in/yaml/v2/emitterc.go b/vendor/go.yaml.in/yaml/v2/emitterc.go index a1c2cc5262..638a268c79 100644 --- a/vendor/go.yaml.in/yaml/v2/emitterc.go +++ b/vendor/go.yaml.in/yaml/v2/emitterc.go @@ -130,10 +130,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true diff --git a/vendor/go.yaml.in/yaml/v2/parserc.go b/vendor/go.yaml.in/yaml/v2/parserc.go index 81d05dfe57..2883e5c58f 100644 --- a/vendor/go.yaml.in/yaml/v2/parserc.go +++ b/vendor/go.yaml.in/yaml/v2/parserc.go @@ -170,7 +170,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -192,9 +193,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -277,8 +281,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -299,9 +303,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -332,30 +337,41 @@ func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -574,8 +590,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -627,7 +643,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -664,14 +681,14 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -723,13 +740,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -757,16 +772,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -825,11 +842,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -849,8 +865,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -873,8 +889,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -891,16 +907,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -965,8 +982,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/go.yaml.in/yaml/v2/readerc.go b/vendor/go.yaml.in/yaml/v2/readerc.go index 7c1f5fac3d..b0c436c4a8 100644 --- a/vendor/go.yaml.in/yaml/v2/readerc.go +++ b/vendor/go.yaml.in/yaml/v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/vendor/go.yaml.in/yaml/v2/resolve.go b/vendor/go.yaml.in/yaml/v2/resolve.go index 4120e0c916..e29c364b33 100644 --- a/vendor/go.yaml.in/yaml/v2/resolve.go +++ b/vendor/go.yaml.in/yaml/v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/vendor/go.yaml.in/yaml/v2/scannerc.go b/vendor/go.yaml.in/yaml/v2/scannerc.go index 0b9bb6030a..d634dca4b0 100644 --- a/vendor/go.yaml.in/yaml/v2/scannerc.go +++ b/vendor/go.yaml.in/yaml/v2/scannerc.go @@ -1500,11 +1500,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1601,11 +1601,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1640,8 +1640,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1679,10 +1680,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1716,9 +1718,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte diff --git a/vendor/go.yaml.in/yaml/v2/sorter.go b/vendor/go.yaml.in/yaml/v2/sorter.go index 4c45e660a8..2edd734055 100644 --- a/vendor/go.yaml.in/yaml/v2/sorter.go +++ b/vendor/go.yaml.in/yaml/v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/vendor/go.yaml.in/yaml/v2/yaml.go b/vendor/go.yaml.in/yaml/v2/yaml.go index 5248e1263c..cf0aea15de 100644 --- a/vendor/go.yaml.in/yaml/v2/yaml.go +++ b/vendor/go.yaml.in/yaml/v2/yaml.go @@ -2,8 +2,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/yaml/go-yaml -// +// https://github.com/yaml/go-yaml package yaml import ( @@ -67,16 +66,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -166,36 +164,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() diff --git a/vendor/go.yaml.in/yaml/v2/yamlh.go b/vendor/go.yaml.in/yaml/v2/yamlh.go index f6a9c8e34b..640f9d95de 100644 --- a/vendor/go.yaml.in/yaml/v2/yamlh.go +++ b/vendor/go.yaml.in/yaml/v2/yamlh.go @@ -408,7 +408,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -604,13 +606,14 @@ type yaml_parser_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/vendor/golang.org/x/lint/golint/importcomment.go b/vendor/golang.org/x/lint/golint/importcomment.go index d5b32f7346..a65dc87ffc 100644 --- a/vendor/golang.org/x/lint/golint/importcomment.go +++ b/vendor/golang.org/x/lint/golint/importcomment.go @@ -4,6 +4,7 @@ // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd. +//go:build go1.12 // +build go1.12 // Require use of the correct import path only for Go 1.12+ users, so diff --git a/vendor/gopkg.in/inf.v0/dec.go b/vendor/gopkg.in/inf.v0/dec.go index 26548b63ce..124cce1443 100644 --- a/vendor/gopkg.in/inf.v0/dec.go +++ b/vendor/gopkg.in/inf.v0/dec.go @@ -9,17 +9,16 @@ // This package is currently in experimental stage and the API may change. // // This package does NOT support: -// - rounding to specific precisions (as opposed to specific decimal positions) -// - the notion of context (each rounding must be explicit) -// - NaN and Inf values, and distinguishing between positive and negative zero -// - conversions to and from float32/64 types +// - rounding to specific precisions (as opposed to specific decimal positions) +// - the notion of context (each rounding must be explicit) +// - NaN and Inf values, and distinguishing between positive and negative zero +// - conversions to and from float32/64 types // // Features considered for possible addition: -// + formatting options -// + Exp method -// + combined operations such as AddRound/MulAdd etc -// + exchanging data in decimal32/64/128 formats -// +// - formatting options +// - Exp method +// - combined operations such as AddRound/MulAdd etc +// - exchanging data in decimal32/64/128 formats package inf // import "gopkg.in/inf.v0" // TODO: @@ -43,19 +42,19 @@ import ( // // The mathematical value of a Dec equals: // -// unscaled * 10**(-scale) +// unscaled * 10**(-scale) // // Note that different Dec representations may have equal mathematical values. // -// unscaled scale String() -// ------------------------- -// 0 0 "0" -// 0 2 "0.00" -// 0 -2 "0" -// 1 0 "1" -// 100 2 "1.00" -// 10 0 "10" -// 1 -1 "10" +// unscaled scale String() +// ------------------------- +// 0 0 "0" +// 0 2 "0.00" +// 0 -2 "0" +// 1 0 "1" +// 100 2 "1.00" +// 10 0 "10" +// 1 -1 "10" // // The zero value for a Dec represents the value 0 with scale 0. // @@ -79,7 +78,6 @@ import ( // QuoRound should be used with a Scale and a Rounder. // QuoExact or QuoRound with RoundExact can be used in the special cases when it // is known that the result is always a finite decimal. -// type Dec struct { unscaled big.Int scale Scale @@ -182,7 +180,6 @@ func (z *Dec) Set(x *Dec) *Dec { // -1 if x < 0 // 0 if x == 0 // +1 if x > 0 -// func (x *Dec) Sign() int { return x.UnscaledBig().Sign() } @@ -196,10 +193,9 @@ func (z *Dec) Neg(x *Dec) *Dec { // Cmp compares x and y and returns: // -// -1 if x < y -// 0 if x == y -// +1 if x > y -// +// -1 if x < y +// 0 if x == y +// +1 if x > y func (x *Dec) Cmp(y *Dec) int { xx, yy := upscale(x, y) return xx.UnscaledBig().Cmp(yy.UnscaledBig()) @@ -252,7 +248,6 @@ func (z *Dec) Round(x *Dec, s Scale, r Rounder) *Dec { // // There is no corresponding Div method; the equivalent can be achieved through // the choice of Rounder used. -// func (z *Dec) QuoRound(x, y *Dec, s Scale, r Rounder) *Dec { return z.quo(x, y, sclr{s}, r) } @@ -290,10 +285,9 @@ func (z *Dec) QuoExact(x, y *Dec) *Dec { // The remainder is normalized to the range -1 < r < 1 to simplify rounding; // that is, the results satisfy the following equation: // -// x / y = z + (remNum/remDen) * 10**(-z.Scale()) +// x / y = z + (remNum/remDen) * 10**(-z.Scale()) // // See Rounder for more details about rounding. -// func (z *Dec) quoRem(x, y *Dec, s Scale, useRem bool, remNum, remDen *big.Int) (*Dec, *big.Int, *big.Int) { // difference (required adjustment) compared to "canonical" result scale diff --git a/vendor/gopkg.in/inf.v0/rounder.go b/vendor/gopkg.in/inf.v0/rounder.go index 3a97ef529b..866180bf4c 100644 --- a/vendor/gopkg.in/inf.v0/rounder.go +++ b/vendor/gopkg.in/inf.v0/rounder.go @@ -9,7 +9,6 @@ import ( // Dec.Quo(). // // See the Example for results of using each Rounder with some sample values. -// type Rounder rounder // See http://speleotrove.com/decimal/damodel.html#refround for more detailed diff --git a/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go b/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go index 11d0669723..948f989a2b 100644 --- a/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go +++ b/vendor/gopkg.in/natefinch/lumberjack.v2/chown.go @@ -1,3 +1,4 @@ +//go:build !linux // +build !linux package lumberjack diff --git a/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go b/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go index 3447cdc056..8fe043e076 100644 --- a/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go +++ b/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go @@ -3,7 +3,7 @@ // Note that this is v2.0 of lumberjack, and should be imported using gopkg.in // thusly: // -// import "gopkg.in/natefinch/lumberjack.v2" +// import "gopkg.in/natefinch/lumberjack.v2" // // The package name remains simply lumberjack, and the code resides at // https://github.com/natefinch/lumberjack under the v2.0 branch. @@ -66,7 +66,7 @@ var _ io.WriteCloser = (*Logger)(nil) // `/var/log/foo/server.log`, a backup created at 6:30pm on Nov 11 2016 would // use the filename `/var/log/foo/server-2016-11-04T18-30-00.000.log` // -// Cleaning Up Old Log Files +// # Cleaning Up Old Log Files // // Whenever a new logfile gets created, old log files may be deleted. The most // recent files according to the encoded timestamp will be retained, up to a diff --git a/vendor/gopkg.in/op/go-logging.v1/format.go b/vendor/gopkg.in/op/go-logging.v1/format.go index 2d6a4044f3..3f76a4a039 100644 --- a/vendor/gopkg.in/op/go-logging.v1/format.go +++ b/vendor/gopkg.in/op/go-logging.v1/format.go @@ -153,17 +153,18 @@ type stringFormatter struct { // The verbs: // // General: -// %{id} Sequence number for log message (uint64). -// %{pid} Process id (int) -// %{time} Time when log occurred (time.Time) -// %{level} Log level (Level) -// %{module} Module (string) -// %{program} Basename of os.Args[0] (string) -// %{message} Message (string) -// %{longfile} Full file name and line number: /a/b/c/d.go:23 -// %{shortfile} Final file name element and line number: d.go:23 -// %{callpath} Callpath like main.a.b.c...c "..." meaning recursive call -// %{color} ANSI color based on log level +// +// %{id} Sequence number for log message (uint64). +// %{pid} Process id (int) +// %{time} Time when log occurred (time.Time) +// %{level} Log level (Level) +// %{module} Module (string) +// %{program} Basename of os.Args[0] (string) +// %{message} Message (string) +// %{longfile} Full file name and line number: /a/b/c/d.go:23 +// %{shortfile} Final file name element and line number: d.go:23 +// %{callpath} Callpath like main.a.b.c...c "..." meaning recursive call +// %{color} ANSI color based on log level // // For normal types, the output can be customized by using the 'verbs' defined // in the fmt package, eg. '%{id:04d}' to make the id output be '%04d' as the @@ -187,11 +188,12 @@ type stringFormatter struct { // future. // // Experimental: -// %{longpkg} Full package path, eg. github.com/go-logging -// %{shortpkg} Base package path, eg. go-logging -// %{longfunc} Full function name, eg. littleEndian.PutUint32 -// %{shortfunc} Base function name, eg. PutUint32 -// %{callpath} Call function path, eg. main.a.b.c +// +// %{longpkg} Full package path, eg. github.com/go-logging +// %{shortpkg} Base package path, eg. go-logging +// %{longfunc} Full function name, eg. littleEndian.PutUint32 +// %{shortfunc} Base function name, eg. PutUint32 +// %{callpath} Call function path, eg. main.a.b.c func NewStringFormatter(format string) (Formatter, error) { var fmter = &stringFormatter{} diff --git a/vendor/gopkg.in/op/go-logging.v1/log_nix.go b/vendor/gopkg.in/op/go-logging.v1/log_nix.go index 4ff2ab1ab8..3bec3e0c62 100644 --- a/vendor/gopkg.in/op/go-logging.v1/log_nix.go +++ b/vendor/gopkg.in/op/go-logging.v1/log_nix.go @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows // Copyright 2013, Örjan Persson. All rights reserved. diff --git a/vendor/gopkg.in/op/go-logging.v1/log_windows.go b/vendor/gopkg.in/op/go-logging.v1/log_windows.go index b8dc92c67a..f195facb99 100644 --- a/vendor/gopkg.in/op/go-logging.v1/log_windows.go +++ b/vendor/gopkg.in/op/go-logging.v1/log_windows.go @@ -1,4 +1,6 @@ +//go:build windows // +build windows + // Copyright 2013, Örjan Persson. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. @@ -20,7 +22,9 @@ var ( // Character attributes // Note: // -- The attributes are combined to produce various colors (e.g., Blue + Green will create Cyan). -// Clearing all foreground or background colors results in black; setting all creates white. +// +// Clearing all foreground or background colors results in black; setting all creates white. +// // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes. const ( fgBlack = 0x0000 diff --git a/vendor/gopkg.in/op/go-logging.v1/memory.go b/vendor/gopkg.in/op/go-logging.v1/memory.go index 8d5152c0ba..b6402561e5 100644 --- a/vendor/gopkg.in/op/go-logging.v1/memory.go +++ b/vendor/gopkg.in/op/go-logging.v1/memory.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !appengine // +build !appengine package logging diff --git a/vendor/gopkg.in/op/go-logging.v1/syslog.go b/vendor/gopkg.in/op/go-logging.v1/syslog.go index 4faa531709..40fae7563b 100644 --- a/vendor/gopkg.in/op/go-logging.v1/syslog.go +++ b/vendor/gopkg.in/op/go-logging.v1/syslog.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//+build !windows,!plan9 +//go:build !windows && !plan9 +// +build !windows,!plan9 package logging diff --git a/vendor/gopkg.in/op/go-logging.v1/syslog_fallback.go b/vendor/gopkg.in/op/go-logging.v1/syslog_fallback.go index 91bc18de63..05bb1e2fae 100644 --- a/vendor/gopkg.in/op/go-logging.v1/syslog_fallback.go +++ b/vendor/gopkg.in/op/go-logging.v1/syslog_fallback.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//+build windows plan9 +//go:build windows || plan9 +// +build windows plan9 package logging diff --git a/vendor/gopkg.in/warnings.v0/warnings.go b/vendor/gopkg.in/warnings.v0/warnings.go index b849d1e3d9..ee5cebc2d6 100644 --- a/vendor/gopkg.in/warnings.v0/warnings.go +++ b/vendor/gopkg.in/warnings.v0/warnings.go @@ -2,19 +2,19 @@ // // A recurring pattern in Go programming is the following: // -// func myfunc(params) error { -// if err := doSomething(...); err != nil { -// return err -// } -// if err := doSomethingElse(...); err != nil { -// return err -// } -// if ok := doAnotherThing(...); !ok { -// return errors.New("my error") -// } -// ... -// return nil -// } +// func myfunc(params) error { +// if err := doSomething(...); err != nil { +// return err +// } +// if err := doSomethingElse(...); err != nil { +// return err +// } +// if ok := doAnotherThing(...); !ok { +// return errors.New("my error") +// } +// ... +// return nil +// } // // This pattern allows interrupting the flow on any received error. But what if // there are errors that should be noted but still not fatal, for which the flow @@ -27,57 +27,56 @@ // along the way. The only requirement is that fatal and non-fatal errors can be // distinguished programmatically; that is a function such as // -// IsFatal(error) bool +// IsFatal(error) bool // // must be implemented. The following is an example of what the above snippet // could look like using the warnings package: // -// import "gopkg.in/warnings.v0" +// import "gopkg.in/warnings.v0" // -// func isFatal(err error) bool { -// _, ok := err.(WarningType) -// return !ok -// } +// func isFatal(err error) bool { +// _, ok := err.(WarningType) +// return !ok +// } // -// func myfunc(params) error { -// c := warnings.NewCollector(isFatal) -// c.FatalWithWarnings = true -// if err := c.Collect(doSomething()); err != nil { -// return err -// } -// if err := c.Collect(doSomethingElse(...)); err != nil { -// return err -// } -// if ok := doAnotherThing(...); !ok { -// if err := c.Collect(errors.New("my error")); err != nil { -// return err -// } -// } -// ... -// return c.Done() -// } +// func myfunc(params) error { +// c := warnings.NewCollector(isFatal) +// c.FatalWithWarnings = true +// if err := c.Collect(doSomething()); err != nil { +// return err +// } +// if err := c.Collect(doSomethingElse(...)); err != nil { +// return err +// } +// if ok := doAnotherThing(...); !ok { +// if err := c.Collect(errors.New("my error")); err != nil { +// return err +// } +// } +// ... +// return c.Done() +// } // // For an example of a non-trivial code base using this library, see // gopkg.in/gcfg.v1 // // Rules for using warnings // -// - ensure that warnings are programmatically distinguishable from fatal -// errors (i.e. implement an isFatal function and any necessary error types) -// - ensure that there is a single Collector instance for a call of each -// exported function -// - ensure that all errors (fatal or warning) are fed through Collect -// - ensure that every time an error is returned, it is one returned by a -// Collector (from Collect or Done) -// - ensure that Collect is never called after Done +// - ensure that warnings are programmatically distinguishable from fatal +// errors (i.e. implement an isFatal function and any necessary error types) +// - ensure that there is a single Collector instance for a call of each +// exported function +// - ensure that all errors (fatal or warning) are fed through Collect +// - ensure that every time an error is returned, it is one returned by a +// Collector (from Collect or Done) +// - ensure that Collect is never called after Done // // TODO // -// - optionally limit the number of warnings (e.g. stop after 20 warnings) (?) -// - consider interaction with contexts -// - go vet-style invocations verifier -// - semi-automatic code converter -// +// - optionally limit the number of warnings (e.g. stop after 20 warnings) (?) +// - consider interaction with contexts +// - go vet-style invocations verifier +// - semi-automatic code converter package warnings // import "gopkg.in/warnings.v0" import ( diff --git a/vendor/gopkg.in/yaml.v2/apic.go b/vendor/gopkg.in/yaml.v2/apic.go index acf71402cf..fb2821e1e6 100644 --- a/vendor/gopkg.in/yaml.v2/apic.go +++ b/vendor/gopkg.in/yaml.v2/apic.go @@ -143,7 +143,7 @@ func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { emitter.canonical = canonical } -//// Set the indentation increment. +// // Set the indentation increment. func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { if indent < 2 || indent > 9 { indent = 2 diff --git a/vendor/gopkg.in/yaml.v2/emitterc.go b/vendor/gopkg.in/yaml.v2/emitterc.go index a1c2cc5262..638a268c79 100644 --- a/vendor/gopkg.in/yaml.v2/emitterc.go +++ b/vendor/gopkg.in/yaml.v2/emitterc.go @@ -130,10 +130,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true diff --git a/vendor/gopkg.in/yaml.v2/parserc.go b/vendor/gopkg.in/yaml.v2/parserc.go index 81d05dfe57..2883e5c58f 100644 --- a/vendor/gopkg.in/yaml.v2/parserc.go +++ b/vendor/gopkg.in/yaml.v2/parserc.go @@ -170,7 +170,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -192,9 +193,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -277,8 +281,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -299,9 +303,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -332,30 +337,41 @@ func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -574,8 +590,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -627,7 +643,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -664,14 +681,14 @@ func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *y // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -723,13 +740,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -757,16 +772,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -825,11 +842,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -849,8 +865,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -873,8 +889,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -891,16 +907,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -965,8 +982,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/gopkg.in/yaml.v2/readerc.go b/vendor/gopkg.in/yaml.v2/readerc.go index 7c1f5fac3d..b0c436c4a8 100644 --- a/vendor/gopkg.in/yaml.v2/readerc.go +++ b/vendor/gopkg.in/yaml.v2/readerc.go @@ -95,7 +95,7 @@ func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { // [Go] This function was changed to guarantee the requested length size at EOF. // The fact we need to do this is pretty awful, but the description above implies - // for that to be the case, and there are tests + // for that to be the case, and there are tests // If the EOF flag is set and the raw buffer is empty, do nothing. if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { diff --git a/vendor/gopkg.in/yaml.v2/resolve.go b/vendor/gopkg.in/yaml.v2/resolve.go index 4120e0c916..e29c364b33 100644 --- a/vendor/gopkg.in/yaml.v2/resolve.go +++ b/vendor/gopkg.in/yaml.v2/resolve.go @@ -180,7 +180,7 @@ func resolve(tag string, in string) (rtag string, out interface{}) { return yaml_INT_TAG, uintv } } else if strings.HasPrefix(plain, "-0b") { - intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + intv, err := strconv.ParseInt("-"+plain[3:], 2, 64) if err == nil { if true || intv == int64(int(intv)) { return yaml_INT_TAG, int(intv) diff --git a/vendor/gopkg.in/yaml.v2/scannerc.go b/vendor/gopkg.in/yaml.v2/scannerc.go index 0b9bb6030a..d634dca4b0 100644 --- a/vendor/gopkg.in/yaml.v2/scannerc.go +++ b/vendor/gopkg.in/yaml.v2/scannerc.go @@ -1500,11 +1500,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1601,11 +1601,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1640,8 +1640,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1679,10 +1680,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1716,9 +1718,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte diff --git a/vendor/gopkg.in/yaml.v2/sorter.go b/vendor/gopkg.in/yaml.v2/sorter.go index 4c45e660a8..2edd734055 100644 --- a/vendor/gopkg.in/yaml.v2/sorter.go +++ b/vendor/gopkg.in/yaml.v2/sorter.go @@ -52,7 +52,7 @@ func (l keyList) Less(i, j int) bool { var ai, bi int var an, bn int64 if ar[i] == '0' || br[i] == '0' { - for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + for j := i - 1; j >= 0 && unicode.IsDigit(ar[j]); j-- { if ar[j] != '0' { an = 1 bn = 1 diff --git a/vendor/gopkg.in/yaml.v2/yaml.go b/vendor/gopkg.in/yaml.v2/yaml.go index 30813884c0..03756f6bbb 100644 --- a/vendor/gopkg.in/yaml.v2/yaml.go +++ b/vendor/gopkg.in/yaml.v2/yaml.go @@ -2,8 +2,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -67,16 +66,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -166,36 +164,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() diff --git a/vendor/gopkg.in/yaml.v2/yamlh.go b/vendor/gopkg.in/yaml.v2/yamlh.go index f6a9c8e34b..640f9d95de 100644 --- a/vendor/gopkg.in/yaml.v2/yamlh.go +++ b/vendor/gopkg.in/yaml.v2/yamlh.go @@ -408,7 +408,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -604,13 +606,14 @@ type yaml_parser_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/vendor/gopkg.in/yaml.v3/apic.go b/vendor/gopkg.in/yaml.v3/apic.go index ae7d049f18..05fd305da1 100644 --- a/vendor/gopkg.in/yaml.v3/apic.go +++ b/vendor/gopkg.in/yaml.v3/apic.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/gopkg.in/yaml.v3/emitterc.go b/vendor/gopkg.in/yaml.v3/emitterc.go index 0f47c9ca8a..dde20e5079 100644 --- a/vendor/gopkg.in/yaml.v3/emitterc.go +++ b/vendor/gopkg.in/yaml.v3/emitterc.go @@ -162,10 +162,9 @@ func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { // Check if we need to accumulate more events before emitting. // // We accumulate extra -// - 1 event for DOCUMENT-START -// - 2 events for SEQUENCE-START -// - 3 events for MAPPING-START -// +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { if emitter.events_head == len(emitter.events) { return true @@ -241,7 +240,7 @@ func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool emitter.indent += 2 } else { // Everything else aligns to the chosen indentation. - emitter.indent = emitter.best_indent*((emitter.indent+emitter.best_indent)/emitter.best_indent) + emitter.indent = emitter.best_indent * ((emitter.indent + emitter.best_indent) / emitter.best_indent) } } return true diff --git a/vendor/gopkg.in/yaml.v3/parserc.go b/vendor/gopkg.in/yaml.v3/parserc.go index 268558a0d6..25fe823637 100644 --- a/vendor/gopkg.in/yaml.v3/parserc.go +++ b/vendor/gopkg.in/yaml.v3/parserc.go @@ -227,7 +227,8 @@ func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool // Parse the production: // stream ::= STREAM-START implicit_document? explicit_document* STREAM-END -// ************ +// +// ************ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -249,9 +250,12 @@ func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// * +// +// * +// // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// ************************* +// +// ************************* func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { token := peek_token(parser) @@ -356,8 +360,8 @@ func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t // Parse the productions: // explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* -// *********** // +// *********** func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -379,9 +383,10 @@ func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event // Parse the productions: // implicit_document ::= block_node DOCUMENT-END* -// ************* -// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* // +// ************* +// +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -428,30 +433,41 @@ func yaml_parser_set_event_comments(parser *yaml_parser_t, event *yaml_event_t) // Parse the productions: // block_node_or_indentless_sequence ::= -// ALIAS -// ***** -// | properties (block_content | indentless_block_sequence)? -// ********** * -// | block_content | indentless_block_sequence -// * +// +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// // block_node ::= ALIAS -// ***** -// | properties block_content? -// ********** * -// | block_content -// * +// +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// // flow_node ::= ALIAS -// ***** -// | properties flow_content? -// ********** * -// | flow_content -// * +// +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// // properties ::= TAG ANCHOR? | ANCHOR TAG? -// ************************* +// +// ************************* +// // block_content ::= block_collection | flow_collection | SCALAR -// ****** +// +// ****** +// // flow_content ::= flow_collection | SCALAR -// ****** +// +// ****** func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() @@ -682,8 +698,8 @@ func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, i // Parse the productions: // block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END -// ******************** *********** * ********* // +// ******************** *********** * ********* func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -740,7 +756,8 @@ func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_e // Parse the productions: // indentless_sequence ::= (BLOCK-ENTRY block_node?)+ -// *********** * +// +// *********** * func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -805,14 +822,14 @@ func yaml_parser_split_stem_comment(parser *yaml_parser_t, stem_len int) { // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START -// ******************* -// ((KEY block_node_or_indentless_sequence?)? -// *** * -// (VALUE block_node_or_indentless_sequence?)?)* // -// BLOCK-END -// ********* +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* // +// BLOCK-END +// ********* func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -881,13 +898,11 @@ func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_even // Parse the productions: // block_mapping ::= BLOCK-MAPPING_START // -// ((KEY block_node_or_indentless_sequence?)? -// -// (VALUE block_node_or_indentless_sequence?)?)* -// ***** * -// BLOCK-END -// +// ((KEY block_node_or_indentless_sequence?)? // +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -915,16 +930,18 @@ func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_ev // Parse the productions: // flow_sequence ::= FLOW-SEQUENCE-START -// ******************* -// (flow_sequence_entry FLOW-ENTRY)* -// * ********** -// flow_sequence_entry? -// * -// FLOW-SEQUENCE-END -// ***************** +// +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -987,11 +1004,10 @@ func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_ev return true } -// // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// *** * // +// *** * func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1011,8 +1027,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, ev // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// ***** * // +// ***** * func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1035,8 +1051,8 @@ func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, // Parse the productions: // flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * // +// * func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { token := peek_token(parser) if token == nil { @@ -1053,16 +1069,17 @@ func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, ev // Parse the productions: // flow_mapping ::= FLOW-MAPPING-START -// ****************** -// (flow_mapping_entry FLOW-ENTRY)* -// * ********** -// flow_mapping_entry? -// ****************** -// FLOW-MAPPING-END -// **************** -// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * *** * // +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// - *** * func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { if first { token := peek_token(parser) @@ -1128,8 +1145,7 @@ func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event // Parse the productions: // flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? -// * ***** * -// +// - ***** * func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { token := peek_token(parser) if token == nil { diff --git a/vendor/gopkg.in/yaml.v3/readerc.go b/vendor/gopkg.in/yaml.v3/readerc.go index b7de0a89c4..56af245366 100644 --- a/vendor/gopkg.in/yaml.v3/readerc.go +++ b/vendor/gopkg.in/yaml.v3/readerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/gopkg.in/yaml.v3/scannerc.go b/vendor/gopkg.in/yaml.v3/scannerc.go index ca0070108f..30b1f08920 100644 --- a/vendor/gopkg.in/yaml.v3/scannerc.go +++ b/vendor/gopkg.in/yaml.v3/scannerc.go @@ -1614,11 +1614,11 @@ func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { // Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { // Eat '%'. start_mark := parser.mark @@ -1719,11 +1719,11 @@ func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool // Scan the directive name. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^ -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^ // +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { // Consume the directive name. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1758,8 +1758,9 @@ func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark // Scan the value of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^^^^^^ +// +// %YAML 1.1 # a comment \n +// ^^^^^^ func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { // Eat whitespaces. if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { @@ -1797,10 +1798,11 @@ const max_number_length = 2 // Scan the version number of VERSION-DIRECTIVE. // // Scope: -// %YAML 1.1 # a comment \n -// ^ -// %YAML 1.1 # a comment \n -// ^ +// +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { // Repeat while the next character is digit. @@ -1834,9 +1836,9 @@ func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark // Scan the value of a TAG-DIRECTIVE token. // // Scope: -// %TAG !yaml! tag:yaml.org,2002: \n -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { var handle_value, prefix_value []byte @@ -2847,7 +2849,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t continue } if parser.buffer[parser.buffer_pos+peek] == '#' { - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false @@ -2876,7 +2878,7 @@ func yaml_parser_scan_line_comment(parser *yaml_parser_t, token_mark yaml_mark_t parser.comments = append(parser.comments, yaml_comment_t{ token_mark: token_mark, start_mark: start_mark, - line: text, + line: text, }) } return true @@ -2910,7 +2912,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo // the foot is the line below it. var foot_line = -1 if scan_mark.line > 0 { - foot_line = parser.mark.line-parser.newlines+1 + foot_line = parser.mark.line - parser.newlines + 1 if parser.newlines == 0 && parser.mark.column > 1 { foot_line++ } @@ -2996,7 +2998,7 @@ func yaml_parser_scan_comments(parser *yaml_parser_t, scan_mark yaml_mark_t) boo recent_empty = false // Consume until after the consumed comment line. - seen := parser.mark.index+peek + seen := parser.mark.index + peek for { if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { return false diff --git a/vendor/gopkg.in/yaml.v3/writerc.go b/vendor/gopkg.in/yaml.v3/writerc.go index b8a116bf9a..266d0b092c 100644 --- a/vendor/gopkg.in/yaml.v3/writerc.go +++ b/vendor/gopkg.in/yaml.v3/writerc.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE diff --git a/vendor/gopkg.in/yaml.v3/yaml.go b/vendor/gopkg.in/yaml.v3/yaml.go index 8cec6da48d..f0bedf3d63 100644 --- a/vendor/gopkg.in/yaml.v3/yaml.go +++ b/vendor/gopkg.in/yaml.v3/yaml.go @@ -17,8 +17,7 @@ // // Source code and other details for the project are available at GitHub: // -// https://github.com/go-yaml/yaml -// +// https://github.com/go-yaml/yaml package yaml import ( @@ -75,16 +74,15 @@ type Marshaler interface { // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// var t T -// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) // // See the documentation of Marshal for the format of tags and a list of // supported tag options. -// func Unmarshal(in []byte, out interface{}) (err error) { return unmarshal(in, out, false) } @@ -185,36 +183,35 @@ func unmarshal(in []byte, out interface{}, strict bool) (err error) { // // The field tag format accepted is: // -// `(...) yaml:"[][,[,]]" (...)` +// `(...) yaml:"[][,[,]]" (...)` // // The following flags are currently supported: // -// omitempty Only include the field if it's not set to the zero -// value for the type or to empty slices or maps. -// Zero valued structs will be omitted if all their public -// fields are zero, unless they implement an IsZero -// method (see the IsZeroer interface type), in which -// case the field will be excluded if IsZero returns true. +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. // -// flow Marshal using a flow style (useful for structs, -// sequences and maps). +// flow Marshal using a flow style (useful for structs, +// sequences and maps). // -// inline Inline the field, which must be a struct or a map, -// causing all of its fields or keys to be processed as if -// they were part of the outer struct. For maps, keys must -// not conflict with the yaml keys of other struct fields. +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. // // In addition, if the key is "-", the field is ignored. // // For example: // -// type T struct { -// F int `yaml:"a,omitempty"` -// B int -// } -// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" -// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" -// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" func Marshal(in interface{}) (out []byte, err error) { defer handleErr(&err) e := newEncoder() @@ -358,22 +355,21 @@ const ( // // For example: // -// var person struct { -// Name string -// Address yaml.Node -// } -// err := yaml.Unmarshal(data, &person) -// -// Or by itself: +// var person struct { +// Name string +// Address yaml.Node +// } +// err := yaml.Unmarshal(data, &person) // -// var person Node -// err := yaml.Unmarshal(data, &person) +// Or by itself: // +// var person Node +// err := yaml.Unmarshal(data, &person) type Node struct { // Kind defines whether the node is a document, a mapping, a sequence, // a scalar value, or an alias to another node. The specific data type of // scalar nodes may be obtained via the ShortTag and LongTag methods. - Kind Kind + Kind Kind // Style allows customizing the apperance of the node in the tree. Style Style @@ -421,7 +417,6 @@ func (n *Node) IsZero() bool { n.HeadComment == "" && n.LineComment == "" && n.FootComment == "" && n.Line == 0 && n.Column == 0 } - // LongTag returns the long form of the tag that indicates the data type for // the node. If the Tag field isn't explicitly defined, one will be computed // based on the node properties. diff --git a/vendor/gopkg.in/yaml.v3/yamlh.go b/vendor/gopkg.in/yaml.v3/yamlh.go index 7c6d007706..ddcd5513ba 100644 --- a/vendor/gopkg.in/yaml.v3/yamlh.go +++ b/vendor/gopkg.in/yaml.v3/yamlh.go @@ -438,7 +438,9 @@ type yaml_document_t struct { // The number of written bytes should be set to the size_read variable. // // [in,out] data A pointer to an application data specified by -// yaml_parser_set_input(). +// +// yaml_parser_set_input(). +// // [out] buffer The buffer to write the data from the source. // [in] size The size of the buffer. // [out] size_read The actual number of bytes read from the source. @@ -639,7 +641,6 @@ type yaml_parser_t struct { } type yaml_comment_t struct { - scan_mark yaml_mark_t // Position where scanning for comments started token_mark yaml_mark_t // Position after which tokens will be associated with this comment start_mark yaml_mark_t // Position of '#' comment mark @@ -659,13 +660,14 @@ type yaml_comment_t struct { // @a buffer to the output. // // @param[in,out] data A pointer to an application data specified by -// yaml_emitter_set_output(). +// +// yaml_emitter_set_output(). +// // @param[in] buffer The buffer with bytes to be written. // @param[in] size The size of the buffer. // // @returns On success, the handler should return @c 1. If the handler failed, // the returned value should be @c 0. -// type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error type yaml_emitter_state_t int diff --git a/vendor/gopkg.in/yaml.v3/yamlprivateh.go b/vendor/gopkg.in/yaml.v3/yamlprivateh.go index e88f9c54ae..dea1ba9610 100644 --- a/vendor/gopkg.in/yaml.v3/yamlprivateh.go +++ b/vendor/gopkg.in/yaml.v3/yamlprivateh.go @@ -1,17 +1,17 @@ -// +// // Copyright (c) 2011-2019 Canonical Ltd // Copyright (c) 2006-2010 Kirill Simonov -// +// // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies // of the Software, and to permit persons to whom the Software is furnished to do // so, subject to the following conditions: -// +// // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. -// +// // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -137,8 +137,8 @@ func is_crlf(b []byte, i int) bool { func is_breakz(b []byte, i int) bool { //return is_break(b, i) || is_z(b, i) return ( - // is_break: - b[i] == '\r' || // CR (#xD) + // is_break: + b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) @@ -151,8 +151,8 @@ func is_breakz(b []byte, i int) bool { func is_spacez(b []byte, i int) bool { //return is_space(b, i) || is_breakz(b, i) return ( - // is_space: - b[i] == ' ' || + // is_space: + b[i] == ' ' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) @@ -166,8 +166,8 @@ func is_spacez(b []byte, i int) bool { func is_blankz(b []byte, i int) bool { //return is_blank(b, i) || is_breakz(b, i) return ( - // is_blank: - b[i] == ' ' || b[i] == '\t' || + // is_blank: + b[i] == ' ' || b[i] == '\t' || // is_breakz: b[i] == '\r' || // CR (#xD) b[i] == '\n' || // LF (#xA) diff --git a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go index 5b8514b3fa..e38605df92 100644 --- a/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go +++ b/vendor/k8s.io/apimachinery/third_party/forked/golang/json/fields.go @@ -359,8 +359,9 @@ const ( // 4) simpleLetterEqualFold, no specials, no non-letters. // // The letters S and K are special because they map to 3 runes, not just 2: -// * S maps to s and to U+017F 'ſ' Latin small letter long s -// * k maps to K and to U+212A 'K' Kelvin sign +// - S maps to s and to U+017F 'ſ' Latin small letter long s +// - k maps to K and to U+212A 'K' Kelvin sign +// // See http://play.golang.org/p/tTxjOc0OGo // // The returned function is specialized for matching against s and diff --git a/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go b/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go index 7cf29524ce..ed66f84010 100644 --- a/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go +++ b/vendor/k8s.io/client-go/third_party/forked/golang/template/exec.go @@ -1,6 +1,6 @@ -//This package is copied from Go library text/template. -//The original private functions indirect and printableValue -//are exported as public functions. +// This package is copied from Go library text/template. +// The original private functions indirect and printableValue +// are exported as public functions. package template import ( diff --git a/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go b/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go index f0c8e712ca..94c396c657 100644 --- a/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go +++ b/vendor/k8s.io/client-go/third_party/forked/golang/template/funcs.go @@ -1,6 +1,6 @@ -//This package is copied from Go library text/template. -//The original private functions eq, ge, gt, le, lt, and ne -//are exported as public functions. +// This package is copied from Go library text/template. +// The original private functions eq, ge, gt, le, lt, and ne +// are exported as public functions. package template import ( diff --git a/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go b/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go index 67957ee33e..8c05c8efca 100644 --- a/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go +++ b/vendor/k8s.io/code-generator/third_party/forked/golang/reflect/type.go @@ -1,6 +1,6 @@ -//This package is copied from Go library reflect/type.go. -//The struct tag library provides no way to extract the list of struct tags, only -//a specific tag +// This package is copied from Go library reflect/type.go. +// The struct tag library provides no way to extract the list of struct tags, only +// a specific tag package reflect import ( diff --git a/vendor/k8s.io/klog/klog.go b/vendor/k8s.io/klog/klog.go index 2712ce0afc..9ae54c00d7 100644 --- a/vendor/k8s.io/klog/klog.go +++ b/vendor/k8s.io/klog/klog.go @@ -67,7 +67,6 @@ // "glob" pattern and N is a V level. For instance, // -vmodule=gopher*=3 // sets the V level to 3 in all Go files whose names begin "gopher". -// package klog import ( @@ -565,8 +564,11 @@ It returns a buffer containing the formatted header and the user's file and line The depth specifies how many stack frames above lives the source line to be identified in the log message. Log lines have this form: + Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... + where the fields are defined as follows: + L A single character, representing the log level (eg 'I' for INFO) mm The month (zero padded; ie May is '05') dd The day (zero padded) @@ -1114,9 +1116,13 @@ type Verbose bool // The returned value is a boolean of type Verbose, which implements Info, Infoln // and Infof. These methods will write to the Info log if called. // Thus, one may write either +// // if klog.V(2) { klog.Info("log this") } +// // or +// // klog.V(2).Info("log this") +// // The second form is shorter but the first is cheaper if logging is off because it does // not evaluate its arguments. // diff --git a/vendor/modules.txt b/vendor/modules.txt index a5d964da73..4609bdf47a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -321,10 +321,6 @@ github.com/golang-migrate/migrate/v4/source/iofs # github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 ## explicit; go 1.20 github.com/golang/groupcache/lru -# github.com/golang/mock v1.6.0 -## explicit; go 1.11 -github.com/golang/mock/mockgen -github.com/golang/mock/mockgen/model # github.com/golang/protobuf v1.5.4 ## explicit; go 1.17 github.com/golang/protobuf/proto @@ -1093,6 +1089,10 @@ go.podman.io/storage/pkg/reexec go.podman.io/storage/pkg/regexp go.podman.io/storage/pkg/system go.podman.io/storage/pkg/unshare +# go.uber.org/mock v0.6.0 +## explicit; go 1.23.0 +go.uber.org/mock/mockgen +go.uber.org/mock/mockgen/model # go.uber.org/multierr v1.11.0 ## explicit; go 1.19 go.uber.org/multierr