diff --git a/example_byteslice_test.go b/example_byteslice_test.go index 0135f34..0407f0e 100644 --- a/example_byteslice_test.go +++ b/example_byteslice_test.go @@ -8,3 +8,10 @@ func ExampleReverse() { fmt.Printf("%x\n", Reverse(data)) // Output: bada55 } + +func ExampleLPad() { + data := []byte{0x55, 0xDA, 0xBA} + + fmt.Printf("%x\n", LPad(data, 5, 0x22)) + // Output: 222255daba +}