feat: log version

This commit is contained in:
liruichen 2023-08-25 18:51:14 +08:00
parent 147b8a47df
commit 7c39aad1ac
2 changed files with 1 additions and 2 deletions

View File

@ -36,6 +36,7 @@ var (
func init() { func init() {
serverCmd.Flags().StringVarP(&serverHost, "host", "", "127.0.0.1:7777", "specify the host of the goc server") serverCmd.Flags().StringVarP(&serverHost, "host", "", "127.0.0.1:7777", "specify the host of the goc server")
serverCmd.Flags().StringVarP(&serverStore, "store", "", ".goc.kvstore", "specify the host of the goc server") serverCmd.Flags().StringVarP(&serverStore, "store", "", ".goc.kvstore", "specify the host of the goc server")
log.Infof("version: %v", Version)
rootCmd.AddCommand(serverCmd) rootCmd.AddCommand(serverCmd)
} }

View File

@ -17,7 +17,6 @@ import (
"crypto/sha256" "crypto/sha256"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/qiniu/goc/v2/cmd"
"math/rand" "math/rand"
"net/http" "net/http"
"net/rpc" "net/rpc"
@ -131,7 +130,6 @@ func RunGocServerUntilExit(host string, s store.Store) error {
} }
go gs.watchLoop() go gs.watchLoop()
log.Infof("version: %v", cmd.Version)
return r.Run(host) return r.Run(host)
} }