diff --git a/examples_test.go b/examples_test.go index 65a75a1..f6e4300 100644 --- a/examples_test.go +++ b/examples_test.go @@ -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: ; rel="next" +}