diff --git a/README.md b/README.md index 289fcda..07be8f6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ httprouter is a framework used for HTTP request routing. Just replace the standard router of golang with this one: ```golang -import "git.martin-riedl.de/golang/httprouter/v3" +import "git.martin-riedl.de/golang/httprouter/v4" ``` ```golang router := httprouter.New() @@ -27,7 +27,7 @@ err := http.ListenAndServe("localhost:8080", router) A path can also contain placeholder (like :id). If then a request is sent to the url "/user/123" the method gets executed and the URL part (in this case "123") is passed as parameter into your handler function. ```golang -import "git.martin-riedl.de/golang/httprouter/v3" +import "git.martin-riedl.de/golang/httprouter/v4" ``` ```golang router := httprouter.New() @@ -44,7 +44,7 @@ err := http.ListenAndServe("localhost:8080", router) Static files (like JavaScript or CSS) can be served automatically (including caching header and MIME type). It uses the `embed.FS` (since go 1.16) to serve static content. ```golang -import "git.martin-riedl.de/golang/httprouter/v3" +import "git.martin-riedl.de/golang/httprouter/v4" //go:embed files/static/* var staticFiles embed.FS @@ -60,7 +60,7 @@ The framework checks first, if the file exists locally and serves it directly. If not, the file is served from the `embed.FS`. This helps you during local development so you can modify a CSS file without recompiling everything. ```golang -import "git.martin-riedl.de/golang/httprouter/v3" +import "git.martin-riedl.de/golang/httprouter/v4" ``` ```golang staticFS := httprouter.NewFS(&staticFiles) diff --git a/go.mod b/go.mod index 5309e59..ee3c466 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module git.martin-riedl.de/golang/httprouter/v3 +module git.martin-riedl.de/golang/httprouter/v4 go 1.19 \ No newline at end of file