Closed BobyMCbobs closed 1 year ago
Replacing ioutil
to use the functionality provided by io
and os
packages should be fairly easy; a quick scan of the code reveals:
fdsn-ws/fdsn_event.go
113: fdsnEventIndex, err = ioutil.ReadFile("assets/fdsn-ws-event.html")
fdsn-ws/fdsn_station.go
130: fdsnStationIndex, err = ioutil.ReadFile("assets/fdsn-ws-station.html")
485: body, err := ioutil.ReadAll(r.Body)
fdsn-ws/server_test.go
71: log.SetOutput(ioutil.Discard)
fdsn-ws/fdsn_dataselect.go
64: fdsnDataselectIndex, err = ioutil.ReadFile("assets/fdsn-ws-dataselect.html")
fdsn-quake-consumer/sc3ml_backload_test.go
40: files, err := ioutil.ReadDir(dir)
73: b, err = ioutil.ReadFile(f)
fdsn-quake-consumer/sc3ml_test.go
20: b, err := ioutil.ReadFile("etc/" + input)
100: b, err := ioutil.ReadFile("etc/" + input)
122: b, err := ioutil.ReadFile("etc/" + input)
151: if b, err = ioutil.ReadAll(f); err != nil {
176: if b, err = ioutil.ReadAll(f); err != nil {
fdsn-ws-nrt/routes_test.go
80: log.SetOutput(ioutil.Discard)
fdsn-ws-nrt/fdsn_dataselect.go
41: fdsnDataselectIndex, err = ioutil.ReadFile("assets/fdsn-ws-dataselect.html")
Deployment and post-deployment checks would need to be done. Perhaps I can do this as a sort of test case @junghao ?
@wilsonjord, got the same thing here for GeoNet/kit https://github.com/GeoNet/kit/pull/140#issuecomment-1608646526
closing for now. It would be suitable to be done when the team is ready
update to use Go 1.20
related: https://github.com/GeoNet/tickets/issues/13645