go fix my shit
All checks were successful
/ test (push) Successful in 51s

This commit is contained in:
Neemek 2026-09-23 09:13:28 +02:00
parent 0db420aae4
commit 7245af0438
Signed by: neemek
GPG key ID: 433EA4A50D4F55A3
5 changed files with 35 additions and 30 deletions

View file

@ -5,6 +5,7 @@ import (
"fmt"
"log"
"math/big"
"slices"
"strconv"
"strings"
)
@ -68,8 +69,8 @@ func (p ParsingError) Format() string {
b.WriteRune('\n')
b.WriteRune('\n')
for i := len(p.Trace) - 1; i >= 0; i-- {
b.WriteString(fmt.Sprintf("[%d] %s\n", i, p.Trace[i]))
for i, v := range slices.Backward(p.Trace) {
b.WriteString(fmt.Sprintf("[%d] %s\n", i, v))
}
return b.String()