Browse Source

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.
master
Matthew Holt 4 years ago
parent
commit
e68dbe9cf8
No known key found for this signature in database GPG Key ID: 2A349DD577D586A5
  1. 2
      caddy.go

2
caddy.go

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

Loading…
Cancel
Save