diff --git a/README.mkd b/README.mkd index 322c121..b7220cd 100644 --- a/README.mkd +++ b/README.mkd @@ -9,14 +9,22 @@ Docs can be found on [the GoDoc page](https://godoc.org/github.com/TomNomNom/lin ## Basic Example ```go -import "github.com/tomnomnom/linkheader" +package main -header := "; rel=\"next\"," + - "; rel=\"last\"" -links := linkheader.Parse(header) +import ( + "fmt" -for _, link := range links { - fmt.Printf("URL: %s; Rel: %s\n", link.URL, link.Rel) + "github.com/tomnomnom/linkheader" +) + +func main() { + header := "; rel=\"next\"," + + "; rel=\"last\"" + links := linkheader.Parse(header) + + for _, link := range links { + fmt.Printf("URL: %s; Rel: %s\n", link.URL, link.Rel) + } } // Output: