1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2025-11-25 03:24:57 +00:00

Migrate away from ioutil

This commit is contained in:
handlerug
2021-07-02 15:29:55 +07:00
parent b87583ef28
commit 3dccbd602c
4 changed files with 8 additions and 10 deletions

View File

@@ -1,8 +1,8 @@
package hyphae
import (
"io/ioutil"
"log"
"os"
"path/filepath"
"github.com/bouncepaw/mycorrhiza/mimetype"
@@ -33,7 +33,7 @@ func Index(path string) {
// indexHelper finds all hypha files in the full `path` and sends them to the channel. Handling of duplicate entries and attachment and counting them is up to the caller.
func indexHelper(path string, nestLevel uint, ch chan *Hypha) {
nodes, err := ioutil.ReadDir(path)
nodes, err := os.ReadDir(path)
if err != nil {
log.Fatal(err)
}