summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-08-13 11:10:12 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-08-13 11:10:12 +0200
commit666e09bfe7e1ef4a0310c0f78ad2443dc052529a (patch)
tree1654291f75c6f126bff253764f6689e003729cb8
parent1e27b4d7c58e6bafcb70dba804b85594d157d54f (diff)
Move case downwards
-rw-r--r--cmd/mfmt/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/mfmt/main.go b/cmd/mfmt/main.go
index 57d9e8f..c4e2277 100644
--- a/cmd/mfmt/main.go
+++ b/cmd/mfmt/main.go
@@ -72,8 +72,6 @@ func mfmt(file string, r io.Reader, w io.Writer) {
switch {
case len(line) == 0, line[0] == '#':
fmt.Fprintln(w, line)
- case reMintageYear.MatchString(line):
- fmtMintageYear(line, w)
case reMintageRowS.MatchString(line):
switch bufsz {
case len(buf):
@@ -93,6 +91,8 @@ func mfmt(file string, r io.Reader, w io.Writer) {
var ns [3]int
setLongestNum(ns[:], line)
fmtMintageRow(line, ns[:], w)
+ case reMintageYear.MatchString(line):
+ fmtMintageYear(line, w)
default:
warn(fmt.Sprintf("%s:%d: potential syntax error", file, linenr))
fmt.Fprintln(w, line)