diff options
| author | Taras Madan <tarasmadan@google.com> | 2022-09-05 14:27:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-05 12:27:54 +0000 |
| commit | b2f2446b46bf02821d90ebedadae2bf7ae0e880e (patch) | |
| tree | 923cf42842918d6bebca1d6bbdc08abed54d274d /vendor/github.com/go-toolsmith/astcopy | |
| parent | e6654faff4bcca4be92e9a8596fd4b77f747c39e (diff) | |
go.mod, vendor: update (#3358)
* go.mod, vendor: remove unnecessary dependencies
Commands:
1. go mod tidy
2. go mod vendor
* go.mod, vendor: update cloud.google.com/go
Commands:
1. go get -u cloud.google.com/go
2. go mod tidy
3. go mod vendor
* go.mod, vendor: update cloud.google.com/*
Commands:
1. go get -u cloud.google.com/storage cloud.google.com/logging
2. go mod tidy
3. go mod vendor
* go.mod, .golangci.yml, vendor: update *lint*
Commands:
1. go get -u golang.org/x/tools github.com/golangci/golangci-lint@v1.47.0
2. go mod tidy
3. go mod vendor
4. edit .golangci.yml to suppress new errors (resolved in the same PR later)
* all: fix lint errors
hash.go: copy() recommended by gosimple
parse.go: ent is never nil
verifier.go: signal.Notify() with unbuffered channel is bad. Have no idea why.
* .golangci.yml: adjust godot rules
check-all is deprecated, but still work
if you're hesitating too - I'll remove this commit
Diffstat (limited to 'vendor/github.com/go-toolsmith/astcopy')
| -rw-r--r-- | vendor/github.com/go-toolsmith/astcopy/astcopy.go | 8 | ||||
| -rw-r--r-- | vendor/github.com/go-toolsmith/astcopy/go.mod | 5 | ||||
| -rw-r--r-- | vendor/github.com/go-toolsmith/astcopy/go.sum | 6 |
3 files changed, 16 insertions, 3 deletions
diff --git a/vendor/github.com/go-toolsmith/astcopy/astcopy.go b/vendor/github.com/go-toolsmith/astcopy/astcopy.go index 2feffb199..393c5cabc 100644 --- a/vendor/github.com/go-toolsmith/astcopy/astcopy.go +++ b/vendor/github.com/go-toolsmith/astcopy/astcopy.go @@ -3,6 +3,8 @@ package astcopy import ( "go/ast" + + "golang.org/x/exp/typeparams" ) // Node returns x node deep copy. @@ -341,6 +343,9 @@ func FuncType(x *ast.FuncType) *ast.FuncType { cp := *x cp.Params = FieldList(x.Params) cp.Results = FieldList(x.Results) + if typeParams := typeparams.ForFuncType(x); typeParams != nil { + *typeparams.ForFuncType(&cp) = *FieldList(typeParams) + } return &cp } @@ -429,6 +434,9 @@ func TypeSpec(x *ast.TypeSpec) *ast.TypeSpec { cp.Type = copyExpr(x.Type) cp.Doc = CommentGroup(x.Doc) cp.Comment = CommentGroup(x.Comment) + if typeParams := typeparams.ForTypeSpec(x); typeParams != nil { + *typeparams.ForTypeSpec(&cp) = *FieldList(typeParams) + } return &cp } diff --git a/vendor/github.com/go-toolsmith/astcopy/go.mod b/vendor/github.com/go-toolsmith/astcopy/go.mod index 6f3b3027a..8e34ca50f 100644 --- a/vendor/github.com/go-toolsmith/astcopy/go.mod +++ b/vendor/github.com/go-toolsmith/astcopy/go.mod @@ -1,6 +1,9 @@ module github.com/go-toolsmith/astcopy +go 1.16 + require ( - github.com/go-toolsmith/astequal v1.0.0 + github.com/go-toolsmith/astequal v1.0.2 github.com/go-toolsmith/strparse v1.0.0 + golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171 ) diff --git a/vendor/github.com/go-toolsmith/astcopy/go.sum b/vendor/github.com/go-toolsmith/astcopy/go.sum index aa0857030..743006ed1 100644 --- a/vendor/github.com/go-toolsmith/astcopy/go.sum +++ b/vendor/github.com/go-toolsmith/astcopy/go.sum @@ -1,4 +1,6 @@ -github.com/go-toolsmith/astequal v1.0.0 h1:4zxD8j3JRFNyLN46lodQuqz3xdKSrur7U/sr0SDS/gQ= -github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.2 h1:+XvaV8zNxua+9+Oa4AHmgmpo4RYAbwr/qjNppLfX2yM= +github.com/go-toolsmith/astequal v1.0.2/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUDxe2Jb4= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171 h1:DZhP7zSquENyG3Yb6ZpGqNEtgE8dfXhcLcheIF9RQHY= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= |
