Skip to content

Commit

Permalink
updating repoames to use os pkg instead of ioutil pkg after upgrading…
Browse files Browse the repository at this point in the history
… to Go 1.21
  • Loading branch information
shawnHartsell committed Jan 16, 2024
1 parent 2b1548b commit 3b3893d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/reponames.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package src

import (
"fmt"
"io/ioutil"
"os"
"path"
"regexp"
"strings"
Expand Down Expand Up @@ -35,7 +35,7 @@ func getRepoNamesFromRepoFlags(flags *CommonFlags) ([]string, error) {
func getRepoNamesFromCacheDir(flags *CommonFlags) ([]string, error) {
repoNames := make([]string, 0)

orgDirs, err := ioutil.ReadDir(flags.CacheDir)
orgDirs, err := os.ReadDir(flags.CacheDir)
if err != nil {
return nil, errors.Wrapf(err, "error opening cache directory `%s`", flags.CacheDir)
}
Expand All @@ -44,7 +44,7 @@ func getRepoNamesFromCacheDir(flags *CommonFlags) ([]string, error) {
if !orgDir.IsDir() {
return nil, errors.Errorf("unexpected file in root of cache directory `%s`", orgDirPath)
}
repoDirs, err := ioutil.ReadDir(orgDirPath)
repoDirs, err := os.ReadDir(orgDirPath)
if err != nil {
return nil, errors.Wrapf(err, "error opening repository cache directory `%s`", orgDirPath)
}
Expand All @@ -70,7 +70,7 @@ func getRepoNamesFromCSVString(csv string) ([]string, error) {
}

func getRepoNamesFromFile(file string) ([]string, error) {
data, err := ioutil.ReadFile(file)
data, err := os.ReadFile(file)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 3b3893d

Please sign in to comment.