-i устарела

This commit is contained in:
Бородин Роман 2023-07-31 13:24:46 +03:00
parent 35ac5a50d6
commit 593d9241be
2 changed files with 4 additions and 5 deletions

View File

@ -17,7 +17,6 @@ package i18n
import (
"encoding/json"
"io/ioutil"
"os"
"sort"
"strings"
@ -59,7 +58,7 @@ func Load() {
}
func load(localeStr string) {
bytes, err := ioutil.ReadFile("i18n/" + localeStr + ".json")
bytes, err := os.ReadFile("i18n/" + localeStr + ".json")
if nil != err {
logger.Error(err)

View File

@ -124,9 +124,9 @@ func BuildHandler(w http.ResponseWriter, r *http.Request) {
var goBuildArgs []string
goBuildArgs = append(goBuildArgs, "build")
goBuildArgs = append(goBuildArgs, user.BuildArgs(runtime.GOOS)...)
if !gulu.Str.Contains("-i", goBuildArgs) {
goBuildArgs = append(goBuildArgs, "-i")
}
//if !gulu.Str.Contains("-i", goBuildArgs) {
// goBuildArgs = append(goBuildArgs, "-i")
//}
cmd := exec.Command("go", goBuildArgs...)
cmd.Dir = curDir