mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Remove ioutil.ReadDir from usage (#53550)
* add depguard rule for ioutil * replace ioutil.ReadDir with os.ReadDir * use legacy option in depguard supported in golangci-lint v1.40 * replace ioutil.ReadDir with os.ReadDir * return error for file info
This commit is contained in:
@@ -3,8 +3,8 @@ package plugins
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
@@ -22,7 +22,7 @@ func Build(ctx context.Context, grafanaDir string, p syncutil.WorkerPool, g *err
|
||||
log.Printf("Building plugins in %q...", grafanaDir)
|
||||
|
||||
root := filepath.Join(grafanaDir, "plugins-bundled", "internal")
|
||||
fis, err := ioutil.ReadDir(root)
|
||||
fis, err := os.ReadDir(root)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user