Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] remove cockroachdb/errors #677

Merged
merged 3 commits into from
Sep 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ format: \
.PHONY: update/goimports
## run goimports for all go files
update/goimports:
find ./ -type f -regex ".*\.go" | xargs goimports -w
find ./ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs goimports -w

.PHONY: format/yaml
format/yaml:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.d/functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ define profile-web
endef

define go-lint
find ./ -type f -regex ".*\.go" | xargs goimports -w
find ./ -type d -name .git -prune -o -type f -regex '.*\.go' -print | xargs goimports -w
golangci-lint run --enable-all --disable=gochecknoglobals --fix --color always -j 16 --skip-dirs apis/grpc --exclude-use-default=false ./...
endef

Expand Down
3 changes: 1 addition & 2 deletions apis/swagger/agent/core/core/agent.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,7 @@
"format": "int64"
},
"indexing": {
"type": "boolean",
"format": "boolean"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these swagger files updated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't know, I just run make update for dependencies update.
may be swagger version ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked swagger specification, there is not format field for boolean type.
maybe old version has format for boolean type.
FYI: https://swagger.io/specification/#data-types

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rinx (mention for FYI) and I'll merge this PR

"type": "boolean"
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions apis/swagger/manager/index/index/index_manager.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
"format": "int64"
},
"indexing": {
"type": "boolean",
"format": "boolean"
"type": "boolean"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions assets/test/templates/common/function.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ func {{ .TestName }}(t *testing.T) {

{{- if .ReturnsError }}
if !errors.Is(err, w.err) {
return errors.Errorf("got error = %v, want %v", err, w.err)
return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err)
}
{{- end }}
{{- range .TestResults }} {{ $want := Want . }} {{ $got := Got . }}
if !reflect.DeepEqual({{ $got }}, w.{{ $want }}) {
return errors.Errorf("got = %v, want %v", {{ $got }}, w.{{ $want }})
return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", {{ $got }}, w.{{ $want }})
}
{{- end }}
return nil
Expand Down
6 changes: 3 additions & 3 deletions assets/test/templates/option/function.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ func {{ .TestName }}(t *testing.T) {
/*
defaultCheckFunc := func(w want, obj *T, err error) error {
if !errors.Is(err, w.err) {
return errors.Errorf("got error = %v, want %v", err, w.err)
return errors.Errorf("got_error: \"%#v\",\n\t\t\t\twant: \"%#v\"", err, w.err)
}
if !reflect.DeepEqual(obj, w.obj) {
return errors.Errorf("got = %v, want %v", obj, w.obj)
return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj)
}
return nil
}
Expand All @@ -65,7 +65,7 @@ func {{ .TestName }}(t *testing.T) {
/*
defaultCheckFunc := func(w want, obj *T) error {
if !reflect.DeepEqual(obj, w.obj) {
return errors.Errorf("got = %v, want %v", obj, w.obj)
return errors.Errorf("got: \"%#v\",\n\t\t\t\twant: \"%#v\"", obj, w.obj)
}
return nil
}
Expand Down
26 changes: 10 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,24 @@ go 1.15
replace (
cloud.google.com/go => cloud.google.com/go v0.65.0
github.com/Azure/go-autorest => github.com/Azure/go-autorest v14.2.0+incompatible
github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.34.15
github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.34.18
github.com/boltdb/bolt => github.com/boltdb/bolt v1.3.1
github.com/cockroachdb/errors => github.com/cockroachdb/errors v1.7.3
github.com/cockroachdb/sentry-go => github.com/getsentry/sentry-go v0.7.1-0.20200813145726-23c562d005a5
github.com/coreos/etcd => go.etcd.io/etcd v3.3.25+incompatible
github.com/docker/docker => github.com/moby/moby v1.13.1
github.com/envoyproxy/protoc-gen-validate => github.com/envoyproxy/protoc-gen-validate v0.4.1
github.com/go-sql-driver/mysql => github.com/go-sql-driver/mysql v1.5.0
github.com/gobwas/pool => github.com/gobwas/pool v0.2.1
github.com/gocql/gocql => github.com/gocql/gocql v0.0.0-20200815110948-5378c8f664e9
github.com/gogo/googleapis => github.com/gogo/googleapis v1.4.0
github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.1
github.com/google/go-cmp => github.com/google/go-cmp v0.5.2
github.com/google/pprof => github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7
github.com/googleapis/gnostic => github.com/googleapis/gnostic v0.4.0
github.com/gophercloud/gophercloud => github.com/gophercloud/gophercloud v0.12.0
github.com/gorilla/mux => github.com/gorilla/mux v1.8.0
github.com/gorilla/websocket => github.com/gorilla/websocket v1.4.2
github.com/hailocab/go-hostpool => github.com/monzo/go-hostpool v0.0.0-20200724120130-287edbb29340
github.com/klauspost/compress => github.com/klauspost/compress v1.10.11
github.com/hydrogen18/memlistener => github.com/hydrogen18/memlistener v0.0.0-20200120041712-dcc25e7acd91
github.com/klauspost/compress => github.com/klauspost/compress v1.10.12-0.20200903102441-28b892527237
github.com/tensorflow/tensorflow => github.com/tensorflow/tensorflow v2.1.0+incompatible
github.com/yudai/pp => github.com/k0kubun/pp v3.0.1+incompatible
golang.org/x/crypto => golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
google.golang.org/grpc => google.golang.org/grpc v1.31.1
google.golang.org/protobuf => google.golang.org/protobuf v1.25.0
Expand All @@ -45,22 +42,20 @@ require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.4
github.com/aws/aws-sdk-go v1.23.20
github.com/cespare/xxhash/v2 v2.1.1
github.com/cockroachdb/errors v1.6.1
github.com/danielvladco/go-proto-gql/pb v0.6.1
github.com/envoyproxy/protoc-gen-validate v0.1.0
github.com/fsnotify/fsnotify v1.4.9
github.com/getsentry/sentry-go v0.7.0 // indirect
github.com/go-redis/redis/v7 v7.4.0
github.com/go-sql-driver/mysql v1.5.0
github.com/gocql/gocql v0.0.0-20200131111108-92af2e088537
github.com/gocraft/dbr/v2 v2.7.0
github.com/gogo/protobuf v1.3.1
github.com/google/go-cmp v0.5.2
github.com/google/gofuzz v1.2.0
github.com/gorilla/mux v1.7.1
github.com/gorilla/mux v1.8.0
github.com/hashicorp/go-version v1.2.1
github.com/json-iterator/go v1.1.10
github.com/klauspost/compress v1.9.0
github.com/klauspost/compress v0.0.0-00010101000000-000000000000
github.com/kpango/fastime v1.0.16
github.com/kpango/fuid v0.0.0-20200823100533-287aa95e0641
github.com/kpango/gache v1.2.3
Expand All @@ -74,14 +69,13 @@ require (
go.opencensus.io v0.22.4
go.uber.org/automaxprocs v1.3.0
go.uber.org/goleak v1.1.10
golang.org/x/net v0.0.0-20200822124328-c89045814202
golang.org/x/net v0.0.0-20200904194848-62affa334b73
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a
golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f
gonum.org/v1/hdf5 v0.0.0-20200504100616-496fefe91614
gonum.org/v1/netlib v0.0.0-20200824093956-f0ca4b3a5ef5 // indirect
gonum.org/v1/plot v0.7.0
gonum.org/v1/plot v0.8.0
google.golang.org/api v0.31.0
google.golang.org/genproto v0.0.0-20200901141002-b3bf27a9dbd1
google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d
google.golang.org/grpc v1.31.1
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.18.8
Expand Down
Loading