diff options
| author | Shulhan <ms@kilabit.info> | 2022-04-06 01:40:07 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-04-06 02:37:22 +0700 |
| commit | 429a9d9205bad2be34cdfe7fb5b1a9a6f127f541 (patch) | |
| tree | 1debf749d60e00a5ac03a3fecc6960aead0ad236 /lib/dns/server.go | |
| parent | 7186de3415b130a6c67388d8f1bcf54404f6202b (diff) | |
| download | pakakeh.go-429a9d9205bad2be34cdfe7fb5b1a9a6f127f541.tar.xz | |
all: replace any usage of ioutil package with os or io
Since Go 1.16, the ioutil package has been deprecated.
This changes replace any usage that use functions from ioutil package
with their replacement from package os or package io.
Diffstat (limited to 'lib/dns/server.go')
| -rw-r--r-- | lib/dns/server.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dns/server.go b/lib/dns/server.go index 6eff612e..24c74fd5 100644 --- a/lib/dns/server.go +++ b/lib/dns/server.go @@ -10,7 +10,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "log" "net" "net/http" @@ -542,7 +541,7 @@ func (srv *Server) handleDoHGet(w http.ResponseWriter, r *http.Request) { } func (srv *Server) handleDoHPost(w http.ResponseWriter, r *http.Request) { - raw, err := ioutil.ReadAll(r.Body) + raw, err := io.ReadAll(r.Body) if err != nil { w.WriteHeader(http.StatusBadRequest) return |
