diff --git a/API-versioning.md b/API-versioning.md index 665d8ca..30b3744 100644 --- a/API-versioning.md +++ b/API-versioning.md @@ -7,8 +7,8 @@ The version comparison is done by the [go-version](https://github.com/hashicorp/ import ( // [...] - "github.com/kataras/iris" - "github.com/kataras/iris/versioning" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/versioning" ) ``` diff --git a/Getting-started.md b/Getting-started.md index 4fea221..65f4634 100644 --- a/Getting-started.md +++ b/Getting-started.md @@ -7,7 +7,7 @@ Create an empty file, let's assume its name is `example.go`, then open it and co ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.Default() @@ -42,7 +42,7 @@ Let's take a small overview of how easy is to get up and running. ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() diff --git a/HTTP-referer.md b/HTTP-referer.md index 6ed9bad..5020eab 100644 --- a/HTTP-referer.md +++ b/HTTP-referer.md @@ -53,7 +53,7 @@ ReferrerGoogleAdwords ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() diff --git a/Host.md b/Host.md index 97babcd..e966c0f 100644 --- a/Host.md +++ b/Host.md @@ -39,7 +39,7 @@ import ( "os" "net" - "github.com/kataras/iris" + "github.com/kataras/iris/v12" ) func main() { @@ -83,7 +83,7 @@ import ( // - TCP_FASTOPEN. See https://lwn.net/Articles/508865/ for details. "github.com/valyala/tcplisten" - "github.com/kataras/iris" + "github.com/kataras/iris/v12" ) // go get github.com/valyala/tcplisten @@ -225,7 +225,7 @@ import ( "context" "time" - "github.com/kataras/iris" + "github.com/kataras/iris/v12" ) diff --git a/Installation.md b/Installation.md index 828853d..7022a09 100644 --- a/Installation.md +++ b/Installation.md @@ -10,10 +10,10 @@ $ export GO111MODULE=on ## Install ```sh -$ go get github.com/kataras/iris@master +$ go get github.com/kataras/iris/v12@latest ``` -Or edit your project's `go.mod` file, add the following [pseudo-version](https://golang.org/cmd/go/#hdr-Pseudo_versions) and execute `$ go build`. +Or edit your project's `go.mod` file. ```sh module your_project_name @@ -21,7 +21,7 @@ module your_project_name go 1.13 require ( - github.com/kataras/iris v0.0.0-20191005193354-55afd07befa8 + github.com/kataras/iris/v12 v12.0.0 ) ``` @@ -32,7 +32,7 @@ require ( Here is the go-get command to get the latest and greatest Iris version. Master branch is usually stable enough. ```bash -$ go get -u github.com/kataras/iris +$ go get -u github.com/kataras/iris/v12@latest ``` ## Troubleshooting diff --git a/MVC.md b/MVC.md index 69ddbff..1094213 100644 --- a/MVC.md +++ b/MVC.md @@ -8,7 +8,7 @@ Iris has **first-class support for the MVC (Model View Controller) architectural these stuff anywhere else in the Go world. You will have to import the [iris/mvc](https://github.com/kataras/iris/tree/master/mvc) subpackage. ```go -import "github.com/kataras/iris/mvc" +import "github.com/kataras/iris/v12/mvc" ``` Iris web framework supports Request data, Models, Persistence Data and Binding @@ -26,8 +26,8 @@ Serve custom controller's struct's methods as handlers with custom paths(even wi ```go import ( - "github.com/kataras/iris" - "github.com/kataras/iris/mvc" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/mvc" ) func main() { @@ -170,11 +170,11 @@ or high-level controllers: easier to maintain and smaller codebase on large appl package main import ( - "github.com/kataras/iris" - "github.com/kataras/iris/mvc" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/mvc" - "github.com/kataras/iris/middleware/logger" - "github.com/kataras/iris/middleware/recover" + "github.com/kataras/iris/v12/middleware/logger" + "github.com/kataras/iris/v12/middleware/recover" ) func main() { diff --git a/Model-validation.md b/Model-validation.md index ed5ddd5..f9d2947 100644 --- a/Model-validation.md +++ b/Model-validation.md @@ -14,7 +14,7 @@ package main import ( "fmt" - "github.com/kataras/iris" + "github.com/kataras/iris/v12" "gopkg.in/go-playground/validator.v9" ) diff --git a/Request-authentication.md b/Request-authentication.md index c7f6cff..ff127ac 100644 --- a/Request-authentication.md +++ b/Request-authentication.md @@ -22,7 +22,7 @@ The jwt middleware has three methods to validate tokens. ```go import ( - "github.com/kataras/iris" + "github.com/kataras/iris/v12" "github.com/iris-contrib/middleware/jwt" ) diff --git a/Response-recorder.md b/Response-recorder.md index 089d1aa..921fddb 100644 --- a/Response-recorder.md +++ b/Response-recorder.md @@ -57,7 +57,7 @@ Record operation log in global Interceptor. ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() diff --git a/Routing-error-handlers.md b/Routing-error-handlers.md index bd1cc37..42c7eba 100644 --- a/Routing-error-handlers.md +++ b/Routing-error-handlers.md @@ -9,7 +9,7 @@ Example code: ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main(){ app := iris.New() diff --git a/Routing-middleware.md b/Routing-middleware.md index 58a0ab6..cc6e9a3 100644 --- a/Routing-middleware.md +++ b/Routing-middleware.md @@ -9,7 +9,7 @@ A middleware is just a **Handler** form of `func(ctx iris.Context)`, the middlew ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() @@ -60,7 +60,7 @@ After the mainHandler ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() diff --git a/Routing-override-context.md b/Routing-override-context.md index d2feab9..8c5582c 100644 --- a/Routing-override-context.md +++ b/Routing-override-context.md @@ -2,7 +2,7 @@ In this section you will learn how to override the existing [Context](https://go The [Context](https://godoc.org/github.com/kataras/iris/context#Context) is an interface. However as you probably know, when using other frameworks you don't have that functionality of overriding even if it's used as an interface. With Iris you can **attach** your implementation to the **context pool** itself using the `app.ContextPool.Attach` method. -1. Let's get started by importing the `"github.com/kataras/iris/context"` which is required here. +1. Let's get started by importing the `"github.com/kataras/iris/v12/context"` which is required here. 2. Secondly, create your own Context implementation. 3. Add the `Do` and `Next` methods where they just call the `context.Do` and `context.Next` package-level functions. 4. Use the Application's `ContextPool` to set it as the Context implementation that should be used for the route's handlers. @@ -17,9 +17,9 @@ package main import ( "reflect" - "github.com/kataras/iris" + "github.com/kataras/iris/v12" // 1. - "github.com/kataras/iris/context" + "github.com/kataras/iris/v12/context" ) // 2. diff --git a/Routing-reverse-lookups.md b/Routing-reverse-lookups.md index dd7d3d4..74360a5 100644 --- a/Routing-reverse-lookups.md +++ b/Routing-reverse-lookups.md @@ -9,7 +9,7 @@ Route naming is easy, since we just call the returned `*Route` with a `Name` fie ```go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() diff --git a/Routing-wrap-the-router.md b/Routing-wrap-the-router.md index c90aea1..0d0d736 100644 --- a/Routing-wrap-the-router.md +++ b/Routing-wrap-the-router.md @@ -39,7 +39,7 @@ import ( "net/http" "strings" - "github.com/kataras/iris" + "github.com/kataras/iris/v12" ) func newApp() *iris.Application { diff --git a/Routing.md b/Routing.md index 0a13ad7..1d31804 100644 --- a/Routing.md +++ b/Routing.md @@ -120,7 +120,7 @@ There is one special method in Iris that you can use too. It's called `None` and package main import ( - "github.com/kataras/iris" + "github.com/kataras/iris/v12" ) func main() { diff --git a/Sessions-database.md b/Sessions-database.md index e49d0e8..d5175a6 100644 --- a/Sessions-database.md +++ b/Sessions-database.md @@ -14,11 +14,11 @@ For example, to register the redis session database: ```go import ( - "github.com/kataras/iris" - "github.com/kataras/iris/sessions" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/sessions" // 1. Import the session database. - "github.com/kataras/iris/sessions/sessiondb/redis" + "github.com/kataras/iris/v12/sessions/sessiondb/redis" ) // 2. Initialize the database. @@ -63,7 +63,7 @@ sess.UseDatabase(db) ```go import "os" -import "github.com/kataras/iris/sessions/sessiondb/boltdb" +import "github.com/kataras/iris/v12/sessions/sessiondb/boltdb" db, err := boltdb.New("./sessions.db", os.FileMode(0750)) ``` @@ -71,7 +71,7 @@ db, err := boltdb.New("./sessions.db", os.FileMode(0750)) **badger** ```go -import "github.com/kataras/iris/sessions/sessiondb/badger" +import "github.com/kataras/iris/v12/sessions/sessiondb/badger" db, err := badger.New("./data") ``` diff --git a/Sessions-flash-messages.md b/Sessions-flash-messages.md index 3a87524..b603e94 100644 --- a/Sessions-flash-messages.md +++ b/Sessions-flash-messages.md @@ -5,7 +5,7 @@ Sometimes you need to temporarily store data between requests of the same user, As we've seen the [[Sessions]] chapter, you initialize a session like this: ```go -import "github.com/kataras/iris/sessions" +import "github.com/kataras/iris/v12/sessions" sess := sessions.New(sessions.Config{Cookie: "cookieName", ...}) ``` diff --git a/Sessions.md b/Sessions.md index 29e78a8..8da2aac 100644 --- a/Sessions.md +++ b/Sessions.md @@ -22,7 +22,7 @@ Session variables are set with the `Session.Set` method and retrieved by the `Se The sessions manager is created using the `New` package-level function. ```go -import "github.com/kataras/iris/sessions" +import "github.com/kataras/iris/v12/sessions" sess := sessions.New(sessions.Config{Cookie: "cookieName", ...}) ``` @@ -136,9 +136,9 @@ In this example we will only allow authenticated users to view our secret messag package main import ( - "github.com/kataras/iris" + "github.com/kataras/iris/v12" - "github.com/kataras/iris/sessions" + "github.com/kataras/iris/v12/sessions" ) var ( @@ -210,7 +210,7 @@ optionally register it as a middleware and use the package-level `sessions.Get` The `Sessions` struct value contains the `Handler` method which can be used to return an `iris.Handler` to be registered as middleware. ```go -import "github.com/kataras/iris/sessions" +import "github.com/kataras/iris/v12/sessions" sess := sessions.New(sessions.Config{...}) diff --git a/Testing.md b/Testing.md index a7075e8..162f673 100644 --- a/Testing.md +++ b/Testing.md @@ -12,8 +12,8 @@ In our first example we will use the `iris/httptest` to test Basic Authenticatio package main import ( - "github.com/kataras/iris" - "github.com/kataras/iris/middleware/basicauth" + "github.com/kataras/iris/v12" + "github.com/kataras/iris/v12/middleware/basicauth" ) func newApp() *iris.Application { @@ -63,7 +63,7 @@ package main import ( "testing" - "github.com/kataras/iris/httptest" + "github.com/kataras/iris/v12/httptest" ) func TestNewApp(t *testing.T) { @@ -105,7 +105,7 @@ import ( "fmt" "testing" - "github.com/kataras/iris/httptest" + "github.com/kataras/iris/v12/httptest" ) func TestCookiesBasic(t *testing.T) { diff --git a/View.md b/View.md index 1b0e8fe..45e4c58 100644 --- a/View.md +++ b/View.md @@ -75,7 +75,7 @@ Please read the _comments_ too. // file: main.go package main -import "github.com/kataras/iris" +import "github.com/kataras/iris/v12" func main() { app := iris.New() diff --git a/Websockets.md b/Websockets.md index f38edc4..60c74e6 100644 --- a/Websockets.md +++ b/Websockets.md @@ -44,7 +44,7 @@ func Handler(s *neffos.Server, IDGenerator ...IDGenerator) Handler ```go import ( "github.com/kataras/neffos" - "github.com/kataras/iris/websocket" + "github.com/kataras/iris/v12/websocket" ) // [...] @@ -115,7 +115,7 @@ Iris is smart enough to catch the `Namespace string` struct field to use it to r ```go import ( // [...] - "github.com/kataras/iris/mvc" + "github.com/kataras/iris/v12/mvc" ) // [app := iris.New...] diff --git a/dependency-injection.md b/dependency-injection.md index 3ee250c..77395f3 100644 --- a/dependency-injection.md +++ b/dependency-injection.md @@ -11,7 +11,7 @@ To use this feature you should import the hero subpackage: ```go import ( // [...] - "github.com/kataras/iris/hero" + "github.com/kataras/iris/v12/hero" ) ```