Skip to content

Commit 01cef3b

Browse files
committed
knowledge: update Deprecated for Go 1.18
1 parent 970056a commit 01cef3b

File tree

1 file changed

+79
-51
lines changed

1 file changed

+79
-51
lines changed

knowledge/deprecated.go

+79-51
Original file line numberDiff line numberDiff line change
@@ -152,74 +152,102 @@ var StdlibDeprecations = map[string]Deprecation{
152152

153153
// Not marked as deprecated with a recognizable header, but deprecated nonetheless.
154154
"io/ioutil": {16, 16},
155+
156+
"bytes.Title": {18, 0},
157+
"strings.Title": {18, 0},
158+
"(crypto/tls.Config).PreferServerCipherSuites": {18, DeprecatedUseNoLonger},
159+
// It's not clear if Subjects was okay to use in the past, so we err on the less noisy side of assuming that it was.
160+
"(*crypto/x509.CertPool).Subjects": {18, DeprecatedUseNoLonger},
161+
"go/types.NewSignature": {18, 18},
162+
"(net.Error).Temporary": {18, DeprecatedNeverUse},
163+
// InterfaceData is another tricky case. It was deprecated in Go 1.18, but has been useless since Go 1.4, and an
164+
// "alternative" (using your own unsafe hacks) has existed forever. We don't want to get into hairsplitting with
165+
// users who somehow successfully used this between 1.4 and 1.18, so we'll just tag it as deprecated since 1.18.
166+
"(reflect.Value).InterfaceData": {18, 18},
167+
168+
// The following objects are only deprecated on Windows.
169+
"syscall.Syscall": {18, 18},
170+
"syscall.Syscall12": {18, 18},
171+
"syscall.Syscall15": {18, 18},
172+
"syscall.Syscall18": {18, 18},
173+
"syscall.Syscall6": {18, 18},
174+
"syscall.Syscall9": {18, 18},
155175
}
156176

157-
// Last imported from Go at 32b73ae18026e8a9dc4c5aa49999b1ea445bc68c with the following numbers of deprecations:
177+
// Last imported from Go at 4aa1efed4853ea067d665a952eee77c52faac774 with the following numbers of deprecations:
158178
//
159-
// chulak go@master ./src $ rg -c "Deprecated: "
160-
// vendor/golang.org/x/crypto/curve25519/curve25519.go:1
161-
// vendor/golang.org/x/text/transform/transform.go:1
179+
// archive/tar/common.go:2
180+
// archive/zip/struct.go:6
181+
// bytes/bytes.go:1
182+
// cmd/compile/internal/ir/expr.go:1
183+
// cmd/compile/internal/ir/type.go:1
184+
// cmd/compile/internal/syntax/walk.go:1
162185
// cmd/compile/internal/types/sym.go:2
163-
// syscall/route_netbsd.go:1
164-
// syscall/route_bsd.go:7
165-
// syscall/lsf_linux.go:6
166-
// syscall/exec_unix.go:1
167-
// syscall/route_darwin.go:1
168-
// syscall/route_freebsd.go:2
169-
// syscall/route_dragonfly.go:2
170-
// syscall/bpf_darwin.go:18
171-
// syscall/route_openbsd.go:1
172-
// syscall/syscall_windows.go:6
173-
// syscall/syscall.go:3
174-
// syscall/bpf_bsd.go:18
175-
// cmd/compile/internal/types2/type.go:2
176-
// syscall/exec_plan9.go:1
177-
// cmd/internal/obj/textflag.go:1
178-
// cmd/internal/obj/link.go:5
179-
// cmd/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go:1
180-
// cmd/vendor/golang.org/x/mod/semver/semver.go:1
181-
// cmd/vendor/golang.org/x/sys/windows/syscall_windows.go:2
182-
// cmd/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go:1
183-
// cmd/vendor/golang.org/x/mod/modfile/rule.go:2
184-
// cmd/vendor/golang.org/x/sys/windows/security_windows.go:1
185186
// cmd/go/internal/modcmd/edit.go:1
186187
// cmd/go/testdata/mod/example.com_deprecated_a_v1.9.0.txt:2
187-
// cmd/go/testdata/mod/example.com_undeprecated_v1.0.0.txt:2
188188
// cmd/go/testdata/mod/example.com_deprecated_b_v1.9.0.txt:2
189-
// encoding/csv/reader.go:2
190-
// encoding/json/decode.go:1
191-
// encoding/json/encode.go:1
192-
// cmd/go/testdata/script/mod_list_deprecated.txt:2
189+
// cmd/go/testdata/mod/example.com_undeprecated_v1.0.0.txt:2
193190
// cmd/go/testdata/script/mod_deprecate_message.txt:4
194-
// cmd/go/testdata/script/mod_list_deprecated_replace.txt:1
195-
// runtime/cpuprof.go:1
196191
// cmd/go/testdata/script/mod_edit.txt:1
197-
// crypto/tls/common.go:6
198-
// crypto/rc4/rc4.go:1
192+
// cmd/go/testdata/script/mod_list_deprecated.txt:2
193+
// cmd/go/testdata/script/mod_list_deprecated_replace.txt:1
194+
// cmd/internal/obj/link.go:5
195+
// cmd/internal/obj/textflag.go:1
196+
// cmd/vendor/golang.org/x/mod/modfile/rule.go:2
197+
// cmd/vendor/golang.org/x/mod/semver/semver.go:1
198+
// cmd/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go:1
199+
// cmd/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go:1
200+
// cmd/vendor/golang.org/x/sys/windows/security_windows.go:1
201+
// cmd/vendor/golang.org/x/sys/windows/syscall_windows.go:2
202+
// compress/flate/inflate.go:2
199203
// crypto/dsa/dsa.go:1
200-
// path/filepath/path_unix.go:1
201-
// path/filepath/path_windows.go:1
202-
// path/filepath/path_plan9.go:1
203-
// regexp/regexp.go:1
204+
// crypto/rc4/rc4.go:1
205+
// crypto/tls/common.go:7
206+
// crypto/x509/cert_pool.go:1
204207
// crypto/x509/pem_decrypt.go:3
205208
// crypto/x509/x509.go:1
206-
// archive/zip/struct.go:6
207-
// archive/tar/common.go:2
209+
// database/sql/driver/driver.go:6
208210
// debug/gosym/pclntab.go:2
209-
// compress/flate/inflate.go:2
211+
// encoding/csv/reader.go:2
212+
// encoding/json/decode.go:1
213+
// encoding/json/encode.go:1
214+
// go/doc/doc.go:1
215+
// go/importer/importer.go:2
216+
// go/types/errorcodes.go:1
217+
// go/types/interface.go:2
218+
// go/types/signature.go:1
210219
// image/geom.go:2
211220
// image/jpeg/reader.go:1
212-
// os/file.go:1
213221
// net/dial.go:2
214-
// net/http/server.go:2
215-
// net/http/socks_bundle.go:1
222+
// net/http/httptest/recorder.go:1
216223
// net/http/httputil/persist.go:8
217224
// net/http/request.go:6
225+
// net/http/server.go:2
226+
// net/http/socks_bundle.go:1
218227
// net/http/transport.go:3
219-
// net/http/httptest/recorder.go:1
220-
// go/doc/doc.go:1
221-
// go/types/errorcodes.go:1
222-
// go/types/type.go:2
223-
// database/sql/driver/driver.go:6
228+
// net/net.go:1
229+
// os/file.go:1
230+
// path/filepath/path_plan9.go:1
231+
// path/filepath/path_unix.go:1
232+
// path/filepath/path_windows.go:1
233+
// reflect/value.go:1
234+
// regexp/regexp.go:1
235+
// runtime/cpuprof.go:1
236+
// strings/strings.go:1
237+
// syscall/bpf_bsd.go:18
238+
// syscall/bpf_darwin.go:18
239+
// syscall/dll_windows.go:6
240+
// syscall/exec_plan9.go:1
241+
// syscall/exec_unix.go:1
242+
// syscall/lsf_linux.go:6
243+
// syscall/route_bsd.go:7
244+
// syscall/route_darwin.go:1
245+
// syscall/route_dragonfly.go:2
246+
// syscall/route_freebsd.go:2
247+
// syscall/route_netbsd.go:1
248+
// syscall/route_openbsd.go:1
249+
// syscall/syscall.go:3
250+
// syscall/syscall_windows.go:6
224251
// text/template/parse/node.go:5
225-
// go/importer/importer.go:2
252+
// vendor/golang.org/x/crypto/curve25519/curve25519.go:1
253+
// vendor/golang.org/x/text/transform/transform.go:1

0 commit comments

Comments
 (0)