From d8b62dedc51514015d70c22d30d8402b55b7f20f Mon Sep 17 00:00:00 2001 From: Andri Deng Date: Mon, 30 Oct 2017 23:03:54 +0700 Subject: [PATCH] add rsubset example --- example_byteslice_littleendian_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example_byteslice_littleendian_test.go b/example_byteslice_littleendian_test.go index a412293..4aefa22 100644 --- a/example_byteslice_littleendian_test.go +++ b/example_byteslice_littleendian_test.go @@ -23,3 +23,11 @@ func ExampleRToogle() { fmt.Printf("%x\n", RToogle(data, toogleData)) // Output: 778811 } + +func ExampleRSubset() { + data := []byte{0xDA, 0x99, 0xBA} + leastSignificantBit := (uint64)(100) + mostSignificantBit := (uint64)(101) + fmt.Printf("%x\n", RSubset(data, leastSignificantBit, mostSignificantBit)) + // Output: +}