mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 15:53:17 +00:00
Move from deprecated ioutil to os and io packages (#4364)
This commit is contained in:
parent
059fc32f00
commit
c48fadc4a7
26 changed files with 71 additions and 84 deletions
|
@ -17,7 +17,7 @@ package caddyfile
|
|||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
@ -447,7 +447,7 @@ func (p *parser) doSingleImport(importFile string) ([]Token, error) {
|
|||
return nil, p.Errf("Could not import %s: is a directory", importFile)
|
||||
}
|
||||
|
||||
input, err := ioutil.ReadAll(file)
|
||||
input, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
return nil, p.Errf("Could not read imported file %s: %v", importFile, err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue