Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kooksee committed Jun 9, 2022
1 parent 430b943 commit a2f1ef9
Show file tree
Hide file tree
Showing 111 changed files with 44 additions and 28,808 deletions.
3 changes: 2 additions & 1 deletion cmd/cmds/vercmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package vercmd
import (
"encoding/json"
"fmt"
"github.com/pubgo/lava/core/runmode"
"os"
"runtime/debug"

Expand Down Expand Up @@ -40,7 +41,7 @@ func Cmd() *cli.Command {

switch typ {
case "":
dt, err := json.MarshalIndent(version.GetVersion(), "", "\t")
dt, err := json.MarshalIndent(runmode.GetVersion(), "", "\t")
xerror.Panic(err)
fmt.Println(string(dt))
case "json":
Expand Down
28 changes: 28 additions & 0 deletions core/runmode/util.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package runmode

import (
rt "runtime"

"github.com/pubgo/lava/version"
)

func GetVersion() map[string]interface{} {
return map[string]interface{}{
"namespace": Namespace,
"app_id": InstanceID,
"device_id": DeviceID,
"project": Project,
"data": version.Data,
"build_time": version.BuildTime,
"version": version.Version,
"tag": version.Tag,
"commit_id": version.CommitID,
"domain": version.Domain,
"go_root": rt.GOROOT(),
"go_arch": rt.GOARCH,
"go_os": rt.GOOS,
"go_version": rt.Version(),
"num_cpu": rt.NumCPU(),
"num_goroutine": rt.NumGoroutine(),
}
}
2 changes: 1 addition & 1 deletion debug/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package debug

import (
app2 "github.com/pubgo/lava/version"
app2 "github.com/pubgo/lava/core/runmode"
"net/http"
"os"
rd "runtime/debug"
Expand Down
60 changes: 0 additions & 60 deletions example/Makefile

This file was deleted.

17 changes: 0 additions & 17 deletions example/cmd/main.go

This file was deleted.

168 changes: 0 additions & 168 deletions example/configs/config/config.yaml

This file was deleted.

Loading

0 comments on commit a2f1ef9

Please sign in to comment.