1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

rename master branch to main

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-08-20 03:12:46 +03:00
parent 2e9745a915
commit 48f7b38d15
62 changed files with 216 additions and 211 deletions

View File

@@ -90,7 +90,7 @@
* [Redirection](routing/subdomains/redirect/main.go)
* [Multi Instances](routing/subdomains/redirect/multi-instances/main.go)
* [HTTP Errors View](routing/subdomains/http-errors-view/main.go)
* [HTTP Method Override](https://github.com/kataras/iris/blob/master/middleware/methodoverride/methodoverride_test.go)
* [HTTP Method Override](https://github.com/kataras/iris/blob/main/middleware/methodoverride/methodoverride_test.go)
* [API Versioning](routing/versioning/main.go)
* [Sitemap](routing/sitemap/main.go)
* Logging
@@ -175,7 +175,7 @@
* Third-Parties
* [Render `valyala/quicktemplate` templates](view/quicktemplate)
* [Render `shiyanhui/hero` templates](view/herotemplate)
* [Request ID](https://github.com/kataras/iris/blob/master/middleware/requestid/requestid_test.go)
* [Request ID](https://github.com/kataras/iris/blob/main/middleware/requestid/requestid_test.go)
* [Request Rate Limit](request-ratelimit/main.go)
* [Request Referrer](request-referrer/main.go)
* [Webassembly](webassembly/main.go)

View File

@@ -88,7 +88,7 @@
- [Redirection](routing/subdomains/redirect/main.go)
- [Multi Instances](routing/subdomains/redirect/multi-instances/main.go)
- [HTTP Errors View](routing/subdomains/http-errors-view/main.go)
- [HTTP Method Override](https://github.com/kataras/iris/blob/master/middleware/methodoverride/methodoverride_test.go)
- [HTTP Method Override](https://github.com/kataras/iris/blob/main/middleware/methodoverride/methodoverride_test.go)
- [API Versioning](routing/versioning/main.go)
- [Sitemap](routing/sitemap/main.go)
- 日誌
@@ -173,7 +173,7 @@
- 第三方引擎
- [Render `valyala/quicktemplate` templates](view/quicktemplate)
- [Render `shiyanhui/hero` templates](view/herotemplate)
- [請求 ID](https://github.com/kataras/iris/blob/master/middleware/requestid/requestid_test.go)
- [請求 ID](https://github.com/kataras/iris/blob/main/middleware/requestid/requestid_test.go)
- [請求速率限制](request-ratelimit/main.go)
- [請求 Referrer](request-referrer/main.go)
- [Webassembly](webassembly/main.go)

View File

@@ -23,7 +23,7 @@ func main() {
})
// Example for WrapRouter is already here:
// https://github.com/kataras/iris/blob/master/_examples/routing/custom-wrapper/main.go#L53
// https://github.com/kataras/iris/blob/main/_examples/routing/custom-wrapper/main.go#L53
app.WrapRouter(func(w http.ResponseWriter, r *http.Request, irisRouter http.HandlerFunc) {
// Exactly the same source code:
// https://github.com/getsentry/raven-go/blob/379f8d0a68ca237cf8893a1cdfd4f574125e2c51/http.go#L70

View File

@@ -37,7 +37,7 @@ func parse() {
// After `Load` the callers can get an environment variable via `os.Getenv`.
func Load(envFileName string) {
if args := os.Args; len(args) > 1 && args[1] == "help" {
fmt.Fprintln(os.Stderr, "https://github.com/kataras/iris/blob/master/_examples/database/mongodb/README.md")
fmt.Fprintln(os.Stderr, "https://github.com/kataras/iris/blob/main/_examples/database/mongodb/README.md")
os.Exit(-1)
}

View File

@@ -305,7 +305,7 @@ If you have done it successfully. Now go and upload some images and reload the u
- http://www.dropzonejs.com/#server-side-implementation
- https://www.startutorial.com/articles/view/how-to-build-a-file-upload-form-using-dropzonejs-and-php
- https://docs.iris-go.com
- https://github.com/kataras/iris/tree/master/_examples/dropzonejs
- https://github.com/kataras/iris/tree/main/_examples/dropzonejs
## The end

View File

@@ -10,7 +10,7 @@ import (
)
// This example is equivalent to the
// https://github.com/kataras/iris/blob/master/_examples/hello-world/main.go
// https://github.com/kataras/iris/blob/main/_examples/hello-world/main.go
//
// It seems that additional code you
// have to write doesn't worth it

View File

@@ -27,7 +27,7 @@ Navigate to that `app` folder and execute the following command:
```sh
$ go init app
$ go get github.com/kataras/iris/v12@master
$ go get github.com/kataras/iris/v12@main
# or @latest for the latest official release.
```
@@ -136,7 +136,7 @@ func (db *sqlite) Exec(q string) error { return nil }
The `DB` depends on the `Environment.
> A practical and operational database example, including Docker images, can be found at the following guide: https://github.com/kataras/iris/tree/master/_examples/database/mysql
> A practical and operational database example, including Docker images, can be found at the following guide: https://github.com/kataras/iris/tree/main/_examples/database/mysql
## Service

View File

@@ -4,7 +4,7 @@ package main
/*
There is no MVC naming pattern for such these things,you can imagine the limitations of that.
Instead you can use the `BeforeActivation` on your controller to add more advanced routing features
(https://github.com/kataras/iris/tree/master/_examples/routing).
(https://github.com/kataras/iris/tree/main/_examples/routing).
You can also create your own macro,
i.e: /{file:json} or macro function of a specific parameter type i.e: (/{file:string json()}).

View File

@@ -575,13 +575,13 @@ Open one or more browser tabs at: http://localhost:8080 and have fun!
### Download the Source Code
The whole project, all the files you saw in this article are located at: https://github.com/kataras/iris/tree/master/_examples/mvc/vuejs-todo-mvc
The whole project, all the files you saw in this article are located at: https://github.com/kataras/iris/tree/main/_examples/mvc/vuejs-todo-mvc
## References
https://vuejs.org/v2/examples/todomvc.html (using browser's local storage)
https://github.com/kataras/iris/tree/master/_examples/mvc (mvc examples and features overview repository)
https://github.com/kataras/iris/tree/main/_examples/mvc (mvc examples and features overview repository)
## Thank you, once again

View File

@@ -93,6 +93,6 @@ func customIndexPost(ctx iris.Context) {
/* Note that `HandleDir` does use the browser's disk caching by-default
therefore, register the cache handler AFTER any HandleDir calls,
for a faster solution that server doesn't need to keep track of the response
navigate to https://github.com/kataras/iris/blob/master/_examples/cache/client-side/main.go.
navigate to https://github.com/kataras/iris/blob/main/_examples/cache/client-side/main.go.
The `HandleDir` has its own cache mechanism, read the 'file-server' examples. */

View File

@@ -35,7 +35,7 @@ func main() {
app.SetContextErrorHandler(new(errorHandler))
// Read
app.Post("/decode", func(ctx iris.Context) {
// Read https://github.com/kataras/iris/blob/master/_examples/request-body/read-json/main.go as well.
// Read https://github.com/kataras/iris/blob/main/_examples/request-body/read-json/main.go as well.
var user User
err := ctx.ReadJSON(&user)
if err != nil {

View File

@@ -19,7 +19,7 @@ import (
For a more detailed, complete and useful example
you can take a look at the iris' router itself which is located at:
https://github.com/kataras/iris/tree/master/core/router/handler.go
https://github.com/kataras/iris/tree/main/core/router/handler.go
which completes this exact interface, the `router#RequestHandler`.
*/
type customRouter struct {

View File

@@ -2,7 +2,7 @@
[WebSocket](https://wikipedia.org/wiki/WebSocket) is a protocol that enables two-way persistent communication channels over TCP connections. It is used for applications such as chat, stock tickers, games, anywhere you want real-time functionality in a web application.
Iris websocket library is now merged with the [neffos real-time framework](https://github.com/kataras/neffos) and Iris-specific helpers and type aliases live on the [iris/websocket](https://github.com/kataras/iris/tree/master/websocket) subpackage. Learn neffos from its [wiki](https://github.com/kataras/neffos#learning-neffos).
Iris websocket library is now merged with the [neffos real-time framework](https://github.com/kataras/neffos) and Iris-specific helpers and type aliases live on the [iris/websocket](https://github.com/kataras/iris/tree/main/websocket) subpackage. Learn neffos from its [wiki](https://github.com/kataras/neffos#learning-neffos).
Helpers and type aliases improves your code speed when writing a websocket module.
For example, instead of importing both `kataras/iris/websocket` - in order to use its `websocket.Handler` - and `github.com/kataras/neffos` - to create a new websocket server `neffos.New` - you can use the `websocket.New` instead, another example is the `neffos.Conn` which can be declared as `websocket.Conn`.