mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
refactor: Use full commit hash instead of truncated version
Remove unnecessary truncation of Git commit hash from vcs.revision. The full hash provides better traceability and eliminates arbitrary magic numbers in the code. Simpler, cleaner, and more robust approach.
This commit is contained in:
@@ -25,11 +25,7 @@ func getBuildInfo() (version, commit, date string) {
|
||||
for _, setting := range info.Settings {
|
||||
switch setting.Key {
|
||||
case "vcs.revision":
|
||||
if len(setting.Value) >= 7 {
|
||||
commit = setting.Value[:7]
|
||||
} else {
|
||||
commit = setting.Value
|
||||
}
|
||||
commit = setting.Value
|
||||
case "vcs.time":
|
||||
if t, err := time.Parse(time.RFC3339, setting.Value); err == nil {
|
||||
date = t.Format("2006-01-02_15:04:05")
|
||||
|
||||
Reference in New Issue
Block a user