lint issues

This commit is contained in:
Paul Tyng
2022-10-22 21:02:27 -04:00
parent 0552712b3b
commit e7f16ff6c4
2 changed files with 8 additions and 10 deletions

View File

@@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
"os"
"path"
@@ -128,7 +127,7 @@ func extractJSON(jarFile, fieldsDir string) error {
}
}
settingsData, err := ioutil.ReadFile(filepath.Join(fieldsDir, "Setting.json"))
settingsData, err := os.ReadFile(filepath.Join(fieldsDir, "Setting.json"))
if errors.Is(err, os.ErrNotExist) {
return nil
}
@@ -150,7 +149,7 @@ func extractJSON(jarFile, fieldsDir string) error {
return fmt.Errorf("unable to marshal setting %q: %w", k, err)
}
err = ioutil.WriteFile(filepath.Join(fieldsDir, fileName), data, 0755)
err = os.WriteFile(filepath.Join(fieldsDir, fileName), data, 0755)
if err != nil {
return fmt.Errorf("unable to write new settings file: %w", err)
}