1
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-16 21:56:40 -05:00

Change os to ioutil for now

My editor automatically changed ioutil.ReadFile() to os.ReadFile() in accordance
with Go 1.16 changes. I didn't notice this until pushing.

But we still have to support Go 1.15 for a little while.
This commit is contained in:
Matthew Holt 2021-03-30 15:41:54 -06:00
parent bd357bf005
commit e68dbe9cf8
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5

View file

@ -669,7 +669,7 @@ func ParseDuration(s string) (time.Duration, error) {
// have its own unique ID.
func InstanceID() (uuid.UUID, error) {
uuidFilePath := filepath.Join(AppDataDir(), "instance.uuid")
uuidFileBytes, err := os.ReadFile(uuidFilePath)
uuidFileBytes, err := ioutil.ReadFile(uuidFilePath)
if os.IsNotExist(err) {
uuid, err := uuid.NewRandom()
if err != nil {