mirror of
https://github.com/kataras/iris.git
synced 2026-03-06 08:25:59 +00:00
replace ioutil with io package and other minor improvements
This commit is contained in:
@@ -152,7 +152,7 @@ func (loc *Locale) Tag() *language.Tag {
|
||||
}
|
||||
|
||||
// Language should return the exact languagecode of this `Locale`
|
||||
//that the user provided on `New` function.
|
||||
// that the user provided on `New` function.
|
||||
//
|
||||
// Same as `Tag().String()` but it's static.
|
||||
func (loc *Locale) Language() string {
|
||||
|
||||
@@ -3,7 +3,7 @@ package i18n
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -33,7 +33,7 @@ func Glob(globPattern string, options LoaderConfig) Loader {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return load(assetNames, ioutil.ReadFile, options)
|
||||
return load(assetNames, os.ReadFile, options)
|
||||
}
|
||||
|
||||
// Assets accepts a function that returns a list of filenames (physical or virtual),
|
||||
|
||||
Reference in New Issue
Block a user