Skip to content

Commit

Permalink
[cleanup] Fix comment and remove PrettyJson from util
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnazario committed Feb 11, 2025
1 parent 4c7f797 commit 60b12a7
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ package util

import (
"encoding/hex"
"encoding/json"
"fmt"
"golang.org/x/crypto/sha3"
"math/big"
"strconv"
"strings"
)

// SHA3256Hash hashes the input bytes using SHA3-256
// Sha3256Hash hashes the input bytes using SHA3-256
func Sha3256Hash(bytes [][]byte) (output []byte) {
hasher := sha3.New256()
for _, b := range bytes {
Expand Down Expand Up @@ -50,15 +49,3 @@ func StrToBigInt(val string) (num *big.Int, err error) {
}
return num, nil
}

// PrettyJson a simple pretty print for JSON examples
func PrettyJson(x any) string {
out := strings.Builder{}
enc := json.NewEncoder(&out)
enc.SetIndent("", " ")
err := enc.Encode(x)
if err != nil {
return ""
}
return out.String()
}

0 comments on commit 60b12a7

Please sign in to comment.