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

Commit

Permalink
docs(byteslice): add unset example
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse committed Oct 6, 2018
1 parent 7560df1 commit ffb4eda
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions example_byteslice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ func ExampleToggle_simple() {
fmt.Printf("%x\n", output)
// Output: 010101
}

func ExampleUnset() {
data := []byte{0x01, 0x11, 0x00}
unsetData := []byte{0x01, 0x01, 0x01}

output, _ := Unset(data, unsetData)
fmt.Printf("%x\n", output)
// Output: 010100
}

0 comments on commit ffb4eda

Please sign in to comment.