Skip to content

Commit

Permalink
blockhash/main.go: Revert now-unnecessary const rename
Browse files Browse the repository at this point in the history
  • Loading branch information
TwistedAsylumMC committed Sep 6, 2024
1 parent 4a45f8b commit 0638f0b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/blockhash/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ func procPackage(pkg *packages.Package, w io.Writer) {
}

var (
packageFormat = "// Code generated by cmd/blockhash; DO NOT EDIT.\n\npackage %v\n\n"
hashMethodFormat = "\nfunc (%v%v) Hash() (uint64, uint64) {\n\treturn %v, %v\n}\n"
constFormat = "\thash%v"
packageFormat = "// Code generated by cmd/blockhash; DO NOT EDIT.\n\npackage %v\n\n"
methodFormat = "\nfunc (%v%v) Hash() (uint64, uint64) {\n\treturn %v, %v\n}\n"
constFormat = "\thash%v"
)

type hashBuilder struct {
Expand Down Expand Up @@ -209,7 +209,7 @@ func (b *hashBuilder) writeMethods(w io.Writer) {
h = "0"
}

if _, err := fmt.Fprintf(w, hashMethodFormat, recvName, name, "hash"+name, h); err != nil {
if _, err := fmt.Fprintf(w, methodFormat, recvName, name, "hash"+name, h); err != nil {
log.Fatalln(err)
}
}
Expand Down

0 comments on commit 0638f0b

Please sign in to comment.