diff options
| author | 2025-03-09 17:47:56 +0100 | |
|---|---|---|
| committer | 2025-12-01 22:08:04 +0100 | |
| commit | b1af8fd87760b34e3ff2fd3bda38f211815a0473 (patch) | |
| tree | 9317fad1a7ec298d7a8d2678e4e422953bbc6f33 /vendor/code.superseriousbusiness.org/go-png-image-structure/v2/utility.go | |
| parent | [chore] update URLs to forked source (diff) | |
| download | gotosocial-b1af8fd87760b34e3ff2fd3bda38f211815a0473.tar.xz | |
[chore] remove vendor
Diffstat (limited to 'vendor/code.superseriousbusiness.org/go-png-image-structure/v2/utility.go')
| -rw-r--r-- | vendor/code.superseriousbusiness.org/go-png-image-structure/v2/utility.go | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/vendor/code.superseriousbusiness.org/go-png-image-structure/v2/utility.go b/vendor/code.superseriousbusiness.org/go-png-image-structure/v2/utility.go deleted file mode 100644 index cac6020f2..000000000 --- a/vendor/code.superseriousbusiness.org/go-png-image-structure/v2/utility.go +++ /dev/null @@ -1,67 +0,0 @@ -package pngstructure - -import ( - "bytes" - "fmt" -) - -func DumpBytes(data []byte) { - fmt.Printf("DUMP: ") - for _, x := range data { - fmt.Printf("%02x ", x) - } - - fmt.Printf("\n") -} - -func DumpBytesClause(data []byte) { - fmt.Printf("DUMP: ") - - fmt.Printf("[]byte { ") - - for i, x := range data { - fmt.Printf("0x%02x", x) - - if i < len(data)-1 { - fmt.Printf(", ") - } - } - - fmt.Printf(" }\n") -} - -func DumpBytesToString(data []byte) (string, error) { - b := new(bytes.Buffer) - - for i, x := range data { - if _, err := b.WriteString(fmt.Sprintf("%02x", x)); err != nil { - return "", err - } - - if i < len(data)-1 { - if _, err := b.WriteRune(' '); err != nil { - return "", err - } - } - } - - return b.String(), nil -} - -func DumpBytesClauseToString(data []byte) (string, error) { - b := new(bytes.Buffer) - - for i, x := range data { - if _, err := b.WriteString(fmt.Sprintf("0x%02x", x)); err != nil { - return "", err - } - - if i < len(data)-1 { - if _, err := b.WriteString(", "); err != nil { - return "", err - } - } - } - - return b.String(), nil -} |
