Adds example for link string method
This commit is contained in:
parent
7750da0170
commit
9700717000
|
@ -49,3 +49,15 @@ func ExampleLinks_FilterByRel() {
|
|||
// URL: https://api.github.com/user/58276/repos?page=2; Rel: last
|
||||
|
||||
}
|
||||
|
||||
func ExampleLink_String() {
|
||||
link := linkheader.Link{
|
||||
URL: "http://example.com/page/2",
|
||||
Rel: "next",
|
||||
}
|
||||
|
||||
fmt.Printf("Link: %s\n", link.String())
|
||||
|
||||
// Output:
|
||||
// Link: <http://example.com/page/2>; rel="next"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user