Skip to content

Commit

Permalink
chore: make golangci-lint happy
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Gianelloni <[email protected]>
  • Loading branch information
wolf31o2 committed Oct 4, 2023
1 parent dbc35ab commit fb20326
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func GetConnection(errorChan chan error) (*ouroboros.Connection, error) {

func GetSizes(oConn *ouroboros.Connection) string {
if oConn == nil {
return fmt.Sprint(" [green]> txtop[white]")
return fmt.Print(" [green]> txtop[white]")

Check failure on line 168 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many return values
}
capacity, size, numberOfTxs, err := oConn.LocalTxMonitor().Client.GetSizes()
if err != nil {
Expand All @@ -181,16 +181,16 @@ func GetSizes(oConn *ouroboros.Connection) string {

func GetTransactions(oConn *ouroboros.Connection) string {
if oConn == nil {
return fmt.Sprint(" [red]failed to connect to node")
return fmt.Print(" [red]failed to connect to node")

Check failure on line 184 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many return values
}
var sb strings.Builder
sb.WriteString(fmt.Sprint(" [white]Transactions:\n"))
sb.WriteString(fmt.Print(" [white]Transactions:\n"))

Check failure on line 187 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many arguments in call to sb.WriteString
sb.WriteString(fmt.Sprintf(" [white]%-20s %s\n", "Size", "TxHash"))
for {
tx, err := oConn.LocalTxMonitor().Client.NextTx()
if err != nil {
sb.WriteString(fmt.Sprintf(" [red]ERROR: NextTx: %s\n", err))
return fmt.Sprint(sb.String())
return fmt.Print(sb.String())

Check failure on line 193 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many return values
}
if tx == nil {
break
Expand All @@ -200,15 +200,15 @@ func GetTransactions(oConn *ouroboros.Connection) string {
_, err = cbor.Decode(tx, &txUnwrap)
if err != nil {
sb.WriteString(fmt.Sprintf(" [red]ERROR: txUnwrap: %s", err))
return fmt.Sprint(sb.String())
return fmt.Print(sb.String())

Check failure on line 203 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many return values
}
txBody := txUnwrap[0]
txIdHash := blake2b.Sum256(txBody)
txIdHex := hex.EncodeToString(txIdHash[:])

sb.WriteString(fmt.Sprintf(" [white]%-20d [blue]%s[white]\n", size, txIdHex))
}
return fmt.Sprint(sb.String())
return fmt.Print(sb.String())

Check failure on line 211 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many return values
}

func main() {
Expand All @@ -234,8 +234,8 @@ func main() {
GetTransactions(oConn),
))
}
headerText.SetText(fmt.Sprintf(" [green]> txtop[white]"))
footerText.SetText(fmt.Sprintf(" [yellow](esc/q) Quit[white]"))
headerText.SetText(fmt.Print(" [green]> txtop[white]"))

Check failure on line 237 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many arguments in call to headerText.SetText
footerText.SetText(fmt.Print(" [yellow](esc/q) Quit[white]"))

Check failure on line 238 in main.go

View workflow job for this annotation

GitHub Actions / lint (1.20.x, ubuntu-latest)

too many arguments in call to footerText.SetText
flex.SetDirection(tview.FlexRow).
AddItem(headerText,
1,
Expand Down

0 comments on commit fb20326

Please sign in to comment.