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() {
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")
log.Infof("version: %v", Version)
rootCmd.AddCommand(serverCmd)
}

View File

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