From e74fa29832c72f1fa98542aa489a7ffa588c4ebe Mon Sep 17 00:00:00 2001 From: Andrei Simionescu Date: Tue, 31 Oct 2017 11:01:11 +0200 Subject: [PATCH] Fixes #47 --- example_byteslice_test.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/example_byteslice_test.go b/example_byteslice_test.go index 0407f0e..60ff5ff 100644 --- a/example_byteslice_test.go +++ b/example_byteslice_test.go @@ -11,7 +11,16 @@ func ExampleReverse() { func ExampleLPad() { data := []byte{0x55, 0xDA, 0xBA} - + fmt.Printf("%x\n", LPad(data, 5, 0x22)) // Output: 222255daba } + +func ExampleUnset() { + data := []byte{0xDE, 0xAD, 0xBE, 0xEF} + zeroes := []byte{0x00, 0x00, 0x00, 0x00} + + dat, err := Unset(data, zeroes) + fmt.Println(err, dat) + // Output: [0 0 0 0] +}