Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0976514

Browse files
author
xuxinhua
committed
编译版本信息
1 parent f6b1248 commit 0976514

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

websites/code/studygolang/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ DATE=`date +%FT%T%z`
2020

2121
gofmt -w src
2222

23-
go install -ldflags "-X util.Version "$VERSION" -X util.Date "$DATE ./...
23+
go install -ldflags "-X util/version.Version "$VERSION" -X util.Date "$DATE ./...
2424

2525
export GOPATH="$OLDGOPATH"
2626
export PATH="$OLDPATH"

websites/code/studygolang/src/util/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ install(bash/bat). Or date is binary modify time.
1717
1818
To set these manually use -ldflags together with -X, like in this example:
1919
20-
go install -ldflags "-X util.version v1.0"
20+
go install -ldflags "-X util/version.Version v1.0"
2121
2222
*/
2323

0 commit comments

Comments
 (0)