mirror of
https://github.com/beego/bee.git
synced 2024-11-21 18:40:54 +00:00
commit
f73ad3252b
@ -6,15 +6,12 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"gopkg.in/yaml.v2"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
path "path/filepath"
|
path "path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"gopkg.in/yaml.v2"
|
|
||||||
|
|
||||||
"github.com/beego/bee/v2/cmd/commands"
|
"github.com/beego/bee/v2/cmd/commands"
|
||||||
"github.com/beego/bee/v2/config"
|
"github.com/beego/bee/v2/config"
|
||||||
@ -166,13 +163,5 @@ func GetBeegoVersion() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetGoVersion() string {
|
func GetGoVersion() string {
|
||||||
var (
|
return runtime.Version()
|
||||||
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]
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user