Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
Create a struct to provide build info (#1288)
Browse files Browse the repository at this point in the history
* Move buildinfo pkg out of internal.

Intended to share this module with verification server.

* Run goimports over modified files.

* Update additional import paths.

* Also remove an unused module.

* Update build.yaml with the new package location.

* Update variable names in buildinfo and have a struct to export these
values.

* Remove unused file.

* Remove unused interface.

* Fix build error.

* Only export a KeyServer variable instead of a struct.

* Revert most of the changes and only add a new public variable.
  • Loading branch information
yegle authored Jan 15, 2021
1 parent 93f8733 commit 5c9a891
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions internal/buildinfo/buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,19 @@ var (
// BuildTag is the git tag from which this build was created.
BuildTag string = "unknown"
)

// info provides the build information about the key server.
type buildinfo struct{}

// ID returns the build ID.
func (buildinfo) ID() string {
return BuildID
}

// Tag returns the build tag.
func (buildinfo) Tag() string {
return BuildTag
}

// KeyServer provides the build information about the key server.
var KeyServer buildinfo

0 comments on commit 5c9a891

Please sign in to comment.