Skip to content

Commit

Permalink
example
Browse files Browse the repository at this point in the history
  • Loading branch information
gaissmai committed Jul 25, 2022
1 parent 68faa98 commit d703b8e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ func ExampleParse() {
// invalid IPRange isPrefix: false
}

func ExampleIPRange_Addrs() {
first, last := mustParse("fe80::/10").Addrs()

fmt.Printf("Addrs() fe80::/10\n")
fmt.Printf("first: %s\n", first)
fmt.Printf("last: %s\n", last)

// Output:
// Addrs() fe80::/10
// first: fe80::
// last: febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff
}

func ExampleMerge() {
var rs []iprange.IPRange
for _, s := range []string{
Expand Down

0 comments on commit d703b8e

Please sign in to comment.