ax(mining): use predictable names in usage-example comments
Single-letter variables v, c, d in GetVersion/GetCommit/GetBuildDate comments violated AX Principle 1 (predictable names over short names). Replaced with versionString, commitHash, buildDate. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
5a76b5c624
commit
fe53e1fd4c
1 changed files with 3 additions and 3 deletions
|
|
@ -13,17 +13,17 @@ var (
|
|||
date = "unknown"
|
||||
)
|
||||
|
||||
// v := mining.GetVersion() // "1.2.3" or "dev" when unset
|
||||
// versionString := mining.GetVersion() // "1.2.3" or "dev" when unset
|
||||
func GetVersion() string {
|
||||
return version
|
||||
}
|
||||
|
||||
// c := mining.GetCommit() // "a1b2c3d" or "none" when unset
|
||||
// commitHash := mining.GetCommit() // "a1b2c3d" or "none" when unset
|
||||
func GetCommit() string {
|
||||
return commit
|
||||
}
|
||||
|
||||
// d := mining.GetBuildDate() // "2026-04-02T00:00:00Z" or "unknown" when unset
|
||||
// buildDate := mining.GetBuildDate() // "2026-04-02T00:00:00Z" or "unknown" when unset
|
||||
func GetBuildDate() string {
|
||||
return date
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue