style: modernize the new tooling code to match the repo conventions

This commit is contained in:
2026-08-29 16:15:14 +02:00
parent 9beff4ae85
commit 15e8b88d32
3 changed files with 19 additions and 23 deletions
+9 -6
View File
@@ -10,7 +10,8 @@ import (
"path/filepath"
"regexp"
"runtime"
"sort"
"slices"
"strconv"
"strings"
"sourcedock.dev/petrbalvin/gasm-devkit/arch"
@@ -80,9 +81,9 @@ mnemonic, so the audit tracks whatever toolchain `+"`go env GOROOT`"+` names.
// GO-ONLY is not enumerable by probing: Go's table is only visible
// through names we already know, so nothing can be reported there.
sort.Strings(superset)
sort.Strings(backlog)
sort.Strings(shared)
slices.Sort(superset)
slices.Sort(backlog)
slices.Sort(shared)
w := os.Stdout
fmt.Fprintf(w, "gasm table (amd64, families excluded): %d mnemonics\n", len(names))
@@ -176,8 +177,10 @@ func probeGoAsm(names []string) (map[string]bool, error) {
if m == nil {
continue
}
var lineNo int
fmt.Sscanf(m[1], "%d", &lineNo)
lineNo, err := strconv.Atoi(m[1])
if err != nil {
continue
}
if name, ok := lineMnemonic[lineNo]; ok && unrecognizedRe.MatchString(l) {
result[name] = false
}