Skip to content

Commit db164d7

Browse files
author
pengzhen
committed
feat: add git info to ClientVersion
1 parent 06bf183 commit db164d7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

web3/api.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
package web3
22

3-
import "runtime"
3+
import (
4+
"runtime"
5+
6+
"github.com/optimism-java/shisui2/internal/version"
7+
)
48

59
type API struct{}
610

711
func (p *API) ClientVersion() string {
812
// TODO add version
13+
info, _ := version.VCS()
914
name := "Shisui"
1015
name += "/" + runtime.GOOS + "-" + runtime.GOARCH
1116
name += "/" + runtime.Version()
17+
name += "/" + info.Commit + "/" + info.Date
1218
return name
1319
}

0 commit comments

Comments
 (0)