1
0
mirror of https://github.com/beego/bee.git synced 2024-11-21 13:40:53 +00:00

Merge pull request #768 from flycash/master

Fix 767
This commit is contained in:
Ming Deng 2021-03-29 23:21:48 +08:00 committed by GitHub
commit f73ad3252b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,15 +6,12 @@ import (
"encoding/json"
"flag"
"fmt"
"gopkg.in/yaml.v2"
"io"
"os"
"os/exec"
path "path/filepath"
"regexp"
"runtime"
"strings"
"gopkg.in/yaml.v2"
"github.com/beego/bee/v2/cmd/commands"
"github.com/beego/bee/v2/config"
@ -166,13 +163,5 @@ func GetBeegoVersion() string {
}
func GetGoVersion() string {
var (
cmdOut []byte
err error
)
if cmdOut, err = exec.Command("go", "version").Output(); err != nil {
beeLogger.Log.Fatalf("There was an error running 'go version' command: %s", err)
}
return strings.Split(string(cmdOut), " ")[2]
return runtime.Version()
}