mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Conform ldflag names to those that goreleaser uses
This commit is contained in:
@@ -15,15 +15,15 @@ type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
systemInfo *SystemInfo
|
||||
BuiltAt string
|
||||
Date string
|
||||
Version string
|
||||
}
|
||||
|
||||
func NewWidget(builtAt, version string) *Widget {
|
||||
func NewWidget(date, version string) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(" Build ", "system", false),
|
||||
|
||||
BuiltAt: builtAt,
|
||||
Date: date,
|
||||
Version: version,
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func (widget *Widget) Refresh() {
|
||||
widget.View,
|
||||
"%8s: %s\n%8s: %s\n\n%8s: %s\n%8s: %s",
|
||||
"Built",
|
||||
widget.prettyBuiltAt(),
|
||||
widget.prettyDate(),
|
||||
"Vers",
|
||||
widget.Version,
|
||||
"OS",
|
||||
@@ -55,8 +55,8 @@ func (widget *Widget) Refresh() {
|
||||
widget.RefreshedAt = time.Now()
|
||||
}
|
||||
|
||||
func (widget *Widget) prettyBuiltAt() string {
|
||||
str, err := time.Parse(wtf.TimestampFormat, widget.BuiltAt)
|
||||
func (widget *Widget) prettyDate() string {
|
||||
str, err := time.Parse(wtf.TimestampFormat, widget.Date)
|
||||
if err != nil {
|
||||
return err.Error()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user