Documentation
¶
Overview ¶
Created by guoxin in 2024/4/8 17:52
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( //CurrentVersion current version CurrentVersion = "v1" // GitCommit current git commit hash GitCommit = "" // GitBranch current git branch GitBranch = "" // BuildDateTime compile datetime BuildDateTime = "" // StartTime start time StartTime = time.Now().Format(time.RFC3339) )
将如下代码添加到Makefile中 VERSION=v1.0.0 DATETIME=$(shell date +"%Y-%m-%dT%H:%M:%S%z") GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD) GIT_COMMIT = $(shell git log --pretty=format:'%h' -n 1)
LOCALCONF_HOME=chainmaker.org/chainmaker/opennet/did-gateway GOLDFLAGS += -X "${LOCALCONF_HOME}.CurrentVersion=${VERSION}" GOLDFLAGS += -X "${LOCALCONF_HOME}.BuildDateTime=${DATETIME}" GOLDFLAGS += -X "${LOCALCONF_HOME}.GitBranch=${GIT_BRANCH}" GOLDFLAGS += -X "${LOCALCONF_HOME}.GitCommit=${GIT_COMMIT}"
Functions ¶
func GetRouteByPathWithParams ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.