Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Fixes #47
Browse files Browse the repository at this point in the history
  • Loading branch information
andreis committed Oct 31, 2017
1 parent 97bd93e commit e74fa29
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion example_byteslice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: <nil> [0 0 0 0]
}

0 comments on commit e74fa29

Please sign in to comment.