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

Commit

Permalink
[#35] Add documentation example for LPad (#48)
Browse files Browse the repository at this point in the history
Closes #35
  • Loading branch information
ChrisHersh authored and rlespinasse committed Oct 30, 2017
1 parent b2fb380 commit 97bd93e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions example_byteslice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ func ExampleReverse() {
fmt.Printf("%x\n", Reverse(data))
// Output: bada55
}

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

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

0 comments on commit 97bd93e

Please sign in to comment.