Skip to content

Commit 7aca204

Browse files
committed
improve version
Signed-off-by: Markus Blaschke <[email protected]>
1 parent cc6f59d commit 7aca204

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

version/version.go

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ type (
1313
Author string `json:"author"`
1414
Version string `json:"version"`
1515
GitCommit string `json:"gitCommit"`
16-
GitTag string `json:"gitTag"`
1716
BuildDate string `json:"buildDate"`
1817
Go string `json:"go"`
1918
Arch string `json:"arch"`
2019
}
2120
)
2221

23-
const DefaultTitle = `{{.App}} v{{.Version}} ({{.GitCommit}}); {{.Go}}/{{.Arch}}; by {{.Author}}; built at {{.BuildDate}})`
22+
const DefaultTitle = `{{.App}} {{.Version}} ({{.GitCommit}}; {{.Go}}/{{.Arch}}; by {{.Author}}; built at {{.BuildDate}})`
2423

2524
func New(opts ...VersionOptionFunc) *Version {
2625
ver := Version{
@@ -58,13 +57,6 @@ func WithGitCommit(val string) VersionOptionFunc {
5857
}
5958
}
6059

61-
// WithGitTag sets the git tag
62-
func WithGitTag(val string) VersionOptionFunc {
63-
return func(ver *Version) {
64-
ver.GitTag = val
65-
}
66-
}
67-
6860
// WithBuildDate sets the build tage
6961
func WithBuildDate(val string) VersionOptionFunc {
7062
return func(ver *Version) {
@@ -94,11 +86,6 @@ func (v *Version) SetGitCommit(val string) *Version {
9486
return v
9587
}
9688

97-
func (v *Version) SetGitTag(val string) *Version {
98-
v.GitTag = val
99-
return v
100-
}
101-
10289
func (v *Version) SetBuildDate(val string) *Version {
10390
v.GitTag = val
10491
return v

0 commit comments

Comments
 (0)