mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-03 04:10:20 +08:00
fix: improve code format (#2665)
* feat: replace io/ioutils pacakage with io/os package * fix: add missing error handling
This commit is contained in:
@ -16,7 +16,6 @@ package util
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -40,7 +39,7 @@ func GetPath(path string) string {
|
||||
func ListFiles(path string) []string {
|
||||
res := []string{}
|
||||
|
||||
files, err := ioutil.ReadDir(path)
|
||||
files, err := os.ReadDir(path)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user