aboutsummaryrefslogtreecommitdiff
path: root/lib/bytes/bytes_example_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-04-04 23:13:59 +0700
committerShulhan <ms@kilabit.info>2023-04-04 23:17:24 +0700
commit076fe4f98722c5dd14aee1ec2342fdaa2691cf59 (patch)
tree2206be0bd5cf532fce164bc0207d98a44fb9e7a0 /lib/bytes/bytes_example_test.go
parent28f9a8505c70c7650229d2380996ab8f668bc5b6 (diff)
downloadpakakeh.go-076fe4f98722c5dd14aee1ec2342fdaa2691cf59.tar.xz
lib/bytes: changes the DumpPrettyTable output format
The change is to accommodate large bytes data, more than 0xFFFF. The hex address in the first column is increased to 8 digits, the characters compacted without space in between.
Diffstat (limited to 'lib/bytes/bytes_example_test.go')
-rw-r--r--lib/bytes/bytes_example_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bytes/bytes_example_test.go b/lib/bytes/bytes_example_test.go
index ee87776c..1b68fd42 100644
--- a/lib/bytes/bytes_example_test.go
+++ b/lib/bytes/bytes_example_test.go
@@ -408,10 +408,10 @@ func ExampleDumpPrettyTable() {
fmt.Println(bb.String())
// Output:
// DumpPrettyTable
- // | 0 1 2 3 4 5 6 7| 0 1 2 3 4 5 6 7| 0 1 2 3 4 5 6 7|
- // | 8 9 A B C D E F| 8 9 A B C D E F| 8 9 A B C D E F|
- // 0x00| 01 02 03 48 65 6c 6c 6f| . . . H e l l o| 1 2 3 72 101 108 108 111|00
- // 0x08| fe ff | . . | 254 255 |08
+ // | 0 1 2 3 4 5 6 7 | 01234567 | 0 1 2 3 4 5 6 7 |
+ // | 8 9 A B C D E F | 89ABCDEF | 8 9 A B C D E F |
+ // 0x00000000| 01 02 03 48 65 6c 6c 6f | ...Hello | 1 2 3 72 101 108 108 111 |0
+ // 0x00000008| fe ff | .. | 254 255 |8
}
func ExampleWriteUint16() {