summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/core.go6
-rw-r--r--core/entries.go5
2 files changed, 6 insertions, 5 deletions
diff --git a/core/core.go b/core/core.go
index afa20d0..513c84c 100644
--- a/core/core.go
+++ b/core/core.go
@@ -15,7 +15,7 @@ package core
import (
"encoding/json"
"fmt"
- "io"
+ "io/ioutil"
"os"
"path/filepath"
"sync"
@@ -37,7 +37,7 @@ func Init(dataPath string) error {
fi, err := f.Stat()
if err == nil && fi.Size() > 0 {
// File is not empty
- jsonBytes, err := io.ReadAll(f)
+ jsonBytes, err := ioutil.ReadAll(f)
f.Close()
if err != nil {
return fmt.Errorf("read comitium.json error: %w", err)
@@ -72,7 +72,7 @@ func (d *FullData) WriteJSON(dataPath string) error {
if err != nil {
return err
}
- err = os.WriteFile(path, jsonBytes, 0666)
+ err = ioutil.WriteFile(path, jsonBytes, 0666)
if err != nil {
return err
}
diff --git a/core/entries.go b/core/entries.go
index 223ecb9..8beee91 100644
--- a/core/entries.go
+++ b/core/entries.go
@@ -12,6 +12,7 @@ package core
import (
"fmt"
+ "io/ioutil"
"os"
"path/filepath"
"sort"
@@ -116,7 +117,7 @@ Watching these pages for any changes that occur.
=> https://git.nytpu.com/comitium/about/ aggregated using comitium
`
- err := os.WriteFile(path, []byte(rawPage), 0666)
+ err := ioutil.WriteFile(path, []byte(rawPage), 0666)
if err != nil {
return err
}
@@ -161,7 +162,7 @@ func (d *FullData) WriteFeed(dataPath string) error {
=> https://git.nytpu.com/comitium/about/ aggregated using comitium
`
- err := os.WriteFile(path, []byte(rawPage), 0666)
+ err := ioutil.WriteFile(path, []byte(rawPage), 0666)
if err != nil {
return err
}