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 set example
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse committed Oct 6, 2018
1 parent 5ded06a commit 4340081
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 @@ -65,3 +65,12 @@ func ExampleRShift() {
fmt.Printf("%x\n", output)
// Output: 00da99
}

func ExampleSet() {
data := []byte{0xDA, 0x99, 0xBA}
setData := []byte{0x11, 0x22, 0x33}

output, _ := Set(data, setData)
fmt.Printf("%x\n", output)
// Output: dbbbbb
}

0 comments on commit 4340081

Please sign in to comment.