-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move version info inside its own package
- Loading branch information
duaraghav8
committed
Oct 20, 2019
1 parent
74a1a85
commit ab2c7ed
Showing
3 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package version | ||
|
||
import "fmt" | ||
|
||
// The git commit compiled into the final binaries. | ||
// This will be filled by the compiler. | ||
var GitCommit string | ||
|
||
const ( | ||
// Name of the CLI application | ||
AppName = "okta-admin" | ||
|
||
// Application version | ||
Version = "1.0.0" | ||
) | ||
|
||
func FormattedVersion() string { | ||
version := fmt.Sprintf("Okta Admin v%s", Version) | ||
if GitCommit != "" { | ||
return fmt.Sprintf("%s (%s)", version, GitCommit) | ||
} | ||
return version | ||
} |