summaryrefslogtreecommitdiff
path: root/admin.go
diff options
context:
space:
mode:
authorKallyDev <36319157+kallydev@users.noreply.github.com>2021-09-30 01:17:48 +0800
committerGitHub <noreply@github.com>2021-09-29 11:17:48 -0600
commitc48fadc4a7655008d13076c7f757c36368e2ca13 (patch)
tree3fe2837e02e9b664dd5b86afbe42494ac20997f8 /admin.go
parent059fc32f002d00e980b438b3edbdf7b8bcdf9a90 (diff)
Move from deprecated ioutil to os and io packages (#4364)
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/admin.go b/admin.go
index fb45168..684526d 100644
--- a/admin.go
+++ b/admin.go
@@ -26,7 +26,6 @@ import (
"expvar"
"fmt"
"io"
- "io/ioutil"
"net"
"net/http"
"net/http/pprof"
@@ -1202,7 +1201,7 @@ var (
// will get deleted before the process gracefully exits.
func PIDFile(filename string) error {
pid := []byte(strconv.Itoa(os.Getpid()) + "\n")
- err := ioutil.WriteFile(filename, pid, 0600)
+ err := os.WriteFile(filename, pid, 0600)
if err != nil {
return err
}