align exit status

pull/123/head
Simon Let 6 years ago
parent 8360c7318c
commit 694958b2eb
  1. 11
      cmd/cli/main.go

@ -296,8 +296,15 @@ func (i item) toString(length int) string {
exitStStr := "EXIT-STATUS: " + strconv.Itoa(i.exitStatus) exitStStr := "EXIT-STATUS: " + strconv.Itoa(i.exitStatus)
// x := length - len(exitStStr) // x := length - len(exitStStr)
exitStStr = highlightExitStatus(exitStStr) exitStStr = highlightExitStatus(exitStStr)
str := i.display
return str + " " + exitStStr // visually align
spaces := " " // 20 spaces
block := len(spaces)
str := i.display + spaces
x := len(str) / block * block
str = str[:x]
return str + exitStStr
//if len(i.display) < x { //if len(i.display) < x {
// str := i.display // str := i.display
// // for len(str) < x { // // for len(str) < x {

Loading…
Cancel
Save