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

Commit

Permalink
docs(byteslice_littleendian): add rsubset example
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse committed Oct 6, 2018
1 parent 001b06f commit 148be0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions example_byteslice_littleendian_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ func ExampleRUnset() {
fmt.Printf("%x\n", output)
// Output: 110100
}

func ExampleRSubset() {
data := []byte{0xDA, 0x99, 0xBA}
output := RSubset(data, 6, 17)
fmt.Printf("%x\n", output)
// Output: 0a66
}

0 comments on commit 148be0f

Please sign in to comment.