mirror of
https://github.com/moby/moby.git
synced 2025-07-29 07:21:35 +03:00
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit replaces the existing io/ioutil functions with their new definitions in io and os packages. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@ -6,7 +6,6 @@ package main
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
@ -201,11 +200,11 @@ func setupRemoteNetworkDrivers(c *testing.T, mux *http.ServeMux, url, netDrv, ip
|
||||
assert.NilError(c, err)
|
||||
|
||||
fileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", netDrv)
|
||||
err = ioutil.WriteFile(fileName, []byte(url), 0644)
|
||||
err = os.WriteFile(fileName, []byte(url), 0644)
|
||||
assert.NilError(c, err)
|
||||
|
||||
ipamFileName := fmt.Sprintf("/etc/docker/plugins/%s.spec", ipamDrv)
|
||||
err = ioutil.WriteFile(ipamFileName, []byte(url), 0644)
|
||||
err = os.WriteFile(ipamFileName, []byte(url), 0644)
|
||||
assert.NilError(c, err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user