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

Commit

Permalink
add flip example
Browse files Browse the repository at this point in the history
  • Loading branch information
andri-de committed Oct 30, 2017
1 parent 9b980b8 commit 3465038
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion example_byteslice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ func ExampleSet() {
data2 := []byte{0x00}
val, err := Set(data1, data2)
if err == nil || val != nil {
log.Println("Unset with two byte slices of different size needs to return an error and no value")
log.Println("Set with two byte slices of different size needs to return an error and no value")
}
fmt.Printf("%x\n", val)
// Output:
}

func ExampleFlip() {
data := []byte{0x55, 0xDA, 0xBA}
fmt.Printf("%x\n", Flip(data))
// Output: aa2545
}

0 comments on commit 3465038

Please sign in to comment.