Browse Source

Linted testdoor.go

Steve Thielemann 2 years ago
parent
commit
f4443e0f05
1 changed files with 9 additions and 9 deletions
  1. 9 9
      testdoor/testdoor.go

+ 9 - 9
testdoor/testdoor.go

@@ -168,7 +168,7 @@ func MainMenu() door.Menu {
 	menu.Activated = func(item int, d *door.Door) {
 		var line string = descriptions[item]
 		var lines []string = strings.Split(wordwrap.WrapString(line, uint(panelWidth)), "\n")
-		for idx, _ := range descPanel.Lines {
+		for idx := range descPanel.Lines {
 			if idx >= len(lines) {
 				descPanel.Lines[idx].Text = ""
 			} else {
@@ -444,11 +444,11 @@ func progress_bars(d *door.Door) {
 	var bar2 door.BarLine = door.BarLine{Width: 30, Style: door.SOLID, PercentStyle: door.PERCENT_SPACE}
 
 	bar2.ColorRange = []door.BarRange{
-		{2500, door.ColorText("RED")},
-		{5000, door.ColorText("BROWN")},
-		{7500, door.ColorText("BOLD YEL")},
-		{9500, door.ColorText("GREEN")},
-		{10100, door.ColorText("BRI GRE")}}
+		{Percent: 2500, Color: door.ColorText("RED")},
+		{Percent: 5000, Color: door.ColorText("BROWN")},
+		{Percent: 7500, Color: door.ColorText("BOLD YEL")},
+		{Percent: 9500, Color: door.ColorText("GREEN")},
+		{Percent: 10100, Color: door.ColorText("BRI GRE")}}
 
 	var bar3 door.BarLine = door.BarLine{Width: 15, Style: door.GRADIENT, Line: door.Line{DefaultColor: door.ColorText("CYAN")}}
 
@@ -618,7 +618,7 @@ func main() {
 
 	go func() {
 		var output string
-		for _ = range ticker.C {
+		for range ticker.C {
 			output = door.SavePos + door.Goto(door.Width-15, 1) + spin.Output() +
 				door.Goto(door.Width-16, 3) + spin2.Output() + door.RestorePos
 			if !d.Disconnect() {
@@ -672,7 +672,7 @@ func main() {
 	// cterm.txt +687
 	// d.Write("\x1b[?9h") // enable mouse X10 support
 	d.Write("\x1b[?1000h") // enable any-event mouse
-	// d.Write("\x1b[?1006h") // enable SGR Extended mouse // doesn't work in xterm or syncterm?!?
+	// 1006 does not work in xterm or syncterm.
 	press_keys(&d)
 	// press_a_key(&d)
 	d.Write(door.CRNL)
@@ -749,7 +749,7 @@ func main() {
 	}
 
 	d.Write("\x1b[?1000l") // disable mouse
-	// d.Write("\x1b[?1006l") // disable mouse
+
 	d.Write(door.Reset + door.CRNL)
 
 	message = fmt.Sprintf("Returning to the %s BBS..."+door.CRNL, d.Config.BBSID)