mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Some code improvements
* Some assignments simplified by using assignment operators * Rewrite switch statement with only one case as if. * Rewrite if-else chain as a switch statement. * go fmt `modules/todoist/project.go` file.
This commit is contained in:
@@ -63,14 +63,14 @@ func (widget *Widget) contentFrom(calEvents []*CalEvent) string {
|
||||
title,
|
||||
)
|
||||
|
||||
str = str + fmt.Sprintf("%s %s%s\n",
|
||||
str += fmt.Sprintf("%s %s%s\n",
|
||||
lineOne,
|
||||
widget.location(calEvent),
|
||||
widget.timeUntil(calEvent),
|
||||
)
|
||||
|
||||
if (widget.location(calEvent) != "") || (widget.timeUntil(calEvent) != "") {
|
||||
str = str + "\n"
|
||||
str += "\n"
|
||||
}
|
||||
|
||||
prevEvent = calEvent
|
||||
|
||||
Reference in New Issue
Block a user