Skip to content

Commit

Permalink
Remove deprecated ioutil usages
Browse files Browse the repository at this point in the history
  • Loading branch information
shilangyu committed Feb 19, 2022
1 parent c3ef18b commit 144dcbb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -88,7 +87,7 @@ func main() {

func matchingManifests(path string, term string) (res []match) {
term = strings.ToLower(term)
files, err := ioutil.ReadDir(path)
files, err := os.ReadDir(path)
check(err)

var parser fastjson.Parser
Expand All @@ -102,7 +101,7 @@ func matchingManifests(path string, term string) (res []match) {
}

// parse relevant data from manifest
raw, err := ioutil.ReadFile(path + "\\" + name)
raw, err := os.ReadFile(path + "\\" + name)
check(err)
result, _ := parser.ParseBytes(raw)

Expand Down

0 comments on commit 144dcbb

Please sign in to comment.