1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-06 19:47:05 +00:00

Add 'context.OnConnectionClose(callbackFn) bool' and 'context.OnClose(callbackFn)' and give a use case example. More on this path later on, stay tuned.

Former-commit-id: dc6580f072d076b8cb204a681e45905210981153
This commit is contained in:
Gerasimos (Makis) Maropoulos
2018-08-02 17:46:35 +03:00
parent d98da25ffb
commit 5d9ded37c4
9 changed files with 243 additions and 60 deletions

View File

@@ -6,6 +6,57 @@ This folder provides easy to understand code snippets on how to get started with
It doesn't always contain the "best ways" but it does cover each important feature that will make you so excited to GO with iris!
## Running the examples
1. Install the Go Programming Language, version 1.9+ from [here](https://golang.org/dl).
2. Install Iris: `go get -u github.com/kataras/iris`
3. Install any external packages that required by the examples
<details>
<summary>External packages</summary>
```bash
cd _examples && go get ./...
# or
go get github.com/iris-contrib/middleware/...
go get github.com/betacraft/yaag/irisyaag
go get github.com/markbates/goth/...
go get github.com/getsentry/raven-go/...
go get github.com/casbin/casbin
go get github.com/markbates/goth/...
go get github.com/aws/aws-sdk-go/...
go get github.com/getsentry/raven-go/...
go get github.com/casbin/casbin
go get github.com/aws/aws-sdk-go/...
go get github.com/prometheus/client_golang/...
go get github.com/didip/tollbooth
go get github.com/valyala/quicktemplate
go get github.com/shiyanhui/hero
go get github.com/go-xorm/xorm
go get github.com/nfnt/resize
go get github.com/prometheus/client_golang/...
go get github.com/didip/tollbooth
go get github.com/valyala/quicktemplate
go get github.com/shiyanhui/hero
go get github.com/go-xorm/xorm
go get github.com/nfnt/resize
go get github.com/dgrijalva/jwt-go
go get github.com/newrelic/go-agent
go get github.com/valyala/tcplisten
go get github.com/kataras/bindata/cmd/bindata
```
</details>
And execute
```sh
$ cd $GOPATH/src/github.com/kataras/iris/_examples/overview
$ go run main.go
```
> Test the examples by opening a terminal window and execute: `GOCACHE=off && cd _examples && go test -v ./...`
### Overview
- [Hello world!](hello-world/main.go)