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 3637970 commit 9b1ad38
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 @@ -50,3 +50,12 @@ func ExampleLShift() {
fmt.Printf("%x\n", output)
// Output: 99ba00
}

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 9b1ad38

Please sign in to comment.