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:
@@ -148,8 +148,8 @@ func (common *Common) SigilStr(len, pos int, width int) string {
|
||||
|
||||
if len > 1 {
|
||||
sigils = strings.Repeat(common.Sigils.Paging.Normal, pos)
|
||||
sigils = sigils + common.Sigils.Paging.Selected
|
||||
sigils = sigils + strings.Repeat(common.Sigils.Paging.Normal, len-1-pos)
|
||||
sigils += common.Sigils.Paging.Selected
|
||||
sigils += strings.Repeat(common.Sigils.Paging.Normal, len-1-pos)
|
||||
|
||||
sigils = "[lightblue]" + fmt.Sprintf(common.RightAlignFormat(width), sigils) + "[white]"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user