mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
README.md: make backers visible on the top of the page, replaced the prev api to the https://iris-go.com/backers.svg in order this to happens
Former-commit-id: 093f11d05fe9556c79de2cb2886e5d0569f27336
This commit is contained in:
parent
64b26e1211
commit
7fd8baea75
3
.github/ISSUE_TEMPLATE.md
vendored
3
.github/ISSUE_TEMPLATE.md
vendored
|
@ -4,6 +4,5 @@ Examples for the Iris project can be found at
|
|||
Documentation for the Iris project can be found at
|
||||
<https://godoc.org/github.com/kataras/iris>.
|
||||
|
||||
Love iris? Please consider supporting our collective:
|
||||
👉 https://opencollective.com/iris/donate
|
||||
Love iris? Please consider supporting the project:
|
||||
👉 https://iris-go.com/donate
|
|
@ -77,24 +77,15 @@ If you want to be part of this and you've time for collaboration, please open a
|
|||
|
||||
All new contributors of that book will receive prizes!
|
||||
|
||||
## Financial contributions
|
||||
|
||||
We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/iris).
|
||||
Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
|
||||
|
||||
## Credits
|
||||
|
||||
|
||||
### Contributors
|
||||
|
||||
Thank you to all the people who have already contributed to iris!
|
||||
<a href="graphs/contributors"><img src="https://opencollective.com/iris/contributors.svg?width=890" /></a>
|
||||
Thank you to all the people who have already <a href="graphs/contributors">contributed</a> to Iris!
|
||||
|
||||
### Backers
|
||||
|
||||
Thank you to all our backers! [Become a backer](https://opencollective.com/iris#backer)
|
||||
Thank you to all our backers! [Become a backer](https://iris-go.com/donate)
|
||||
|
||||
<a href="https://opencollective.com/iris#backers" target="_blank"><img src="https://opencollective.com/iris/backers.svg?width=890"></a>
|
||||
<a href="https://iris-go.com/donate"><img src="https://iris-go.com/backers.svg?v=1"/></a>
|
||||
|
||||
### Sponsors
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@ Learn what [others say about Iris](#support) and [star](https://github.com/katar
|
|||
|
||||
## Backers
|
||||
|
||||
Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/iris#backer)
|
||||
Thank you to all our backers! 🙏 [Become a backer](https://iris-go.com/donate)
|
||||
|
||||
<a href="https://opencollective.com/iris#backers" target="_blank"><img src="https://opencollective.com/iris/backers.svg?width=890"></a>
|
||||
<a href="https://iris-go.com/donate" target="_blank"><img src="https://iris-go.com/backers.svg?v=1"/></a>
|
||||
|
||||
```sh
|
||||
$ cat example.go
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
## Yποστηρικτές
|
||||
|
||||
Eυχαριστούμε όλους τους υποστηρικτές μας! 🙏 [Γίνετε ένας από αυτούς](https://opencollective.com/iris#backer)
|
||||
Eυχαριστούμε όλους τους υποστηρικτές μας! 🙏 [Γίνετε ένας από αυτούς](https://iris-go.com/donate)
|
||||
|
||||
<a href="https://opencollective.com/iris#backers" target="_blank"><img src="https://opencollective.com/iris/backers.svg?width=890"></a>
|
||||
<a href="https://iris-go.com/donate" target="_blank"><img src="https://iris-go.com/backers.svg?v=1"/></a>
|
||||
|
||||
```sh
|
||||
$ cat example.go
|
||||
|
|
|
@ -14,9 +14,9 @@ Iris предоставляет красиво выразительную и у
|
|||
|
||||
## Сторонники
|
||||
|
||||
Спасибо всем, кто поддерживал нас! 🙏 [Поддержать нас](https://opencollective.com/iris#backer)
|
||||
Спасибо всем, кто поддерживал нас! 🙏 [Поддержать нас](https://iris-go.com/donate)
|
||||
|
||||
<a href="https://opencollective.com/iris#backers" target="_blank"><img src="https://opencollective.com/iris/backers.svg?width=890"></a>
|
||||
<a href="https://iris-go.com/donate" target="_blank"><img src="https://iris-go.com/backers.svg?v=1"/></a>
|
||||
|
||||
```sh
|
||||
$ cat example.go
|
||||
|
|
|
@ -14,9 +14,9 @@ Iris 功能强大、使用简单,它将会是你下一个网站、API 服务
|
|||
|
||||
## 支持者
|
||||
|
||||
感谢所有的支持者! 🙏 [支持我们](https://opencollective.com/iris#backer)
|
||||
感谢所有的支持者! 🙏 [支持我们](https://iris-go.com/donate)
|
||||
|
||||
<a href="https://opencollective.com/iris#backers" target="_blank"><img src="https://opencollective.com/iris/backers.svg?width=890"></a>
|
||||
<a href="https://iris-go.com/donate" target="_blank"><img src="https://iris-go.com/backers.svg?v=1"/></a>
|
||||
|
||||
```sh
|
||||
$ cat example.go
|
||||
|
|
|
@ -21,10 +21,30 @@ func MyHandler(ctx iris.Context) {
|
|||
ctx.Writef("Received: %#v\n", c)
|
||||
}
|
||||
|
||||
type Person struct {
|
||||
Name string `json:"name"`
|
||||
Age int `json:"age"`
|
||||
}
|
||||
|
||||
// MyHandler2 reads a collection of Person from JSON post body.
|
||||
func MyHandler2(ctx iris.Context) {
|
||||
var persons []Person
|
||||
err := ctx.ReadJSON(&persons)
|
||||
|
||||
if err != nil {
|
||||
ctx.StatusCode(iris.StatusBadRequest)
|
||||
ctx.WriteString(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Writef("Received: %#+v\n", persons)
|
||||
}
|
||||
|
||||
func main() {
|
||||
app := iris.New()
|
||||
|
||||
app.Post("/", MyHandler)
|
||||
app.Post("/slice", MyHandler2)
|
||||
|
||||
// use Postman or whatever to do a POST request
|
||||
// to the http://localhost:8080 with RAW BODY:
|
||||
|
|
|
@ -32,6 +32,9 @@ func main() {
|
|||
// http://localhost:8080/reverse_myroute
|
||||
// http://localhost:8080/execute_myroute
|
||||
// http://localhost:8080/anything/any/path/here
|
||||
//
|
||||
// See view/template_html_4 example for more reverse routing examples
|
||||
// using the reverse router component and the {{url}} and {{urlpath}} template functions.
|
||||
app.Run(iris.Addr(":8080"))
|
||||
|
||||
} // See view/template_html_4 example for more.
|
||||
}
|
||||
|
|
|
@ -56,6 +56,12 @@ func main() {
|
|||
}
|
||||
})
|
||||
|
||||
// simple path so you can test it without host mapping and subdomains,
|
||||
// at view it make uses of {{urlpath ...}}
|
||||
// in order to showcase you that you can use it
|
||||
// if you don't want the entire scheme and host to be part of the url.
|
||||
app.Get("/mypath7/{paramfirst}/{paramsecond}/static/{paramthird}", emptyHandler).Name = "my-page7"
|
||||
|
||||
// http://127.0.0.1:8080
|
||||
app.Run(iris.Addr(host))
|
||||
}
|
||||
|
|
|
@ -4,26 +4,40 @@ is the subdomain part instead of named parameter-->
|
|||
<a href="{{url "my-page1" "username1"}}">username1.127.0.0.1:8080/mypath</a>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<a href="{{url "my-page2" "username2" "theParam1" "theParam2"}}">
|
||||
username2.127.0.0.1:8080/mypath2/{paramfirst}/{paramsecond}
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<a href="{{url "my-page3" "username3" "theParam1" "theParam2AfterStatic"}}">
|
||||
username3.127.0.0.1:8080/mypath3/{paramfirst}/statichere/{paramsecond}
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<a href="{{url "my-page4" "username4" "theParam1" "theparam2AfterStatic" "otherParam" "matchAnything"}}">
|
||||
username4.127.0.0.1:8080/mypath4/{paramfirst}/statichere/{paramsecond}/{otherParam}/{something:path}
|
||||
</a>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
<a href="{{url "my-page5" "username5" "theParam1" "theparam2AfterStatic" "otherParam" "matchAnything"}}">
|
||||
username5.127.0.0.1:8080/mypath5/{paramfirst}/statichere/{paramsecond}/{otherparam}/anything/{something:path}
|
||||
</a>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<a href="{{url "my-page6" .ParamsAsArray }}">
|
||||
username5.127.0.0.1:8080/mypath6/{paramfirst}/{paramsecond}/staticParam/{paramThirdAfterStatic}
|
||||
</a>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<a href="{{urlpath "my-page7" "theParam1" "theParam2" "theParam3" }}">
|
||||
mypath7/{paramfirst}/{paramsecond}/static/{paramthird}
|
||||
</a>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user