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

Commit

Permalink
add rshift example
Browse files Browse the repository at this point in the history
  • Loading branch information
andrideng committed Oct 30, 2017
1 parent d8b62de commit cb27908
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion example_byteslice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ func ExampleReverse() {

func ExampleLPad() {
data := []byte{0x55, 0xDA, 0xBA}

fmt.Printf("%x\n", LPad(data, 5, 0x22))
// Output: 222255daba
}

func ExampleRShift() {
data := []byte{0xDA, 0x99, 0xBA}
shift := uint64(16)
fmt.Printf("%x\n", RShift(data, shift))
// Output: 0000da
}

0 comments on commit cb27908

Please sign in to comment.