Skip to content

Commit

Permalink
removed tailing separators
Browse files Browse the repository at this point in the history
  • Loading branch information
Bence Babós committed Sep 29, 2020
1 parent c23b63b commit 3131959
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
3 changes: 0 additions & 3 deletions cmd/page/containerPage.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package page

import (
"fmt"

"github.com/bbabos/swarmon/cmd/docker"
)

Expand Down Expand Up @@ -35,5 +33,4 @@ func containerSubPage(c docker.IContainer) {
},
}
page.render()
defer fmt.Println("----------------------------------------------")
}
3 changes: 0 additions & 3 deletions cmd/page/nodePage.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package page

import (
"fmt"

"github.com/bbabos/swarmon/cmd/docker"
)

Expand Down Expand Up @@ -37,5 +35,4 @@ func nodeSubPage(n docker.INode) {
},
}
page.render()
defer fmt.Println("----------------------------------------------")
}
4 changes: 2 additions & 2 deletions cmd/page/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (p mainPage) render() {

func (p mainPage) renderBase() int {
prompt := promptui.Select{
Label: p.title,
Label: "----- " + p.title + " -----",
Items: p.items,
Templates: &promptui.SelectTemplates{
Label: "{{ . }}",
Expand All @@ -51,7 +51,7 @@ func (p mainPage) renderBase() int {

func (p dynamicPage) renderBase() int {
prompt := promptui.Select{
Label: p.title,
Label: "----- " + p.title + " -----",
Items: p.items,
Templates: &promptui.SelectTemplates{
Label: "{{ . }}",
Expand Down
3 changes: 0 additions & 3 deletions cmd/page/servicePage.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package page

import (
"fmt"

"github.com/bbabos/swarmon/cmd/docker"
)

Expand Down Expand Up @@ -37,5 +35,4 @@ func serviceSubPage(s docker.IService) {
},
}
page.render()
defer fmt.Println("----------------------------------------------")
}
4 changes: 1 addition & 3 deletions cmd/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ func ExecShellCommand(command string, showOutput bool) {
func ExitOnKeystroke(menu func()) {
loop:
for {
fmt.Println("----------------------------------------------")
fmt.Println("Press q to exit!")
fmt.Println("----------------------------------------------")
fmt.Print("Press q to exit! ")
char, _, err := keyboard.GetSingleKey()
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 3131959

Please sign in to comment.