diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 27074c84..61f7a35c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,34 +1 @@ -## Code Of Conduct - -The community should respect and follow our new [Code of Conduct](https://github.com/kataras/iris/blob/master/CODE-OF-CONDUCT.md). - -## Before Submitting an Issue - -Navigate through [issues](https://github.com/kataras/issues) and check if it has been already filled by other person. - - -Before post a new issue, please do an upgrade: - -- Delete `$GOPATH/src/github.com/kataras` -- Open shell and execute the command: `go get -u github.com/kataras/iris` -- Try to re-produce the issue - -To be aware of the framework's changes and updates please **[star](https://github.com/kataras/iris/stargazers)** and **[watch](https://github.com/kataras/iris/watchers)** the repository. - -Do not discuss things that they're not relative to the framework, keep Github issues useful for newcomers. A Github issue should exists to solve or report a problem. - -> If you want to talk about something else that can't be inside Github issues please [chat](https://gitter.im/iris-go/Lobby) with us. - -## Writing Good Bug Reports and Feature Requests - -File a single issue per problem and feature request, do not file combo issues. - -The more information you can provide, the more likely someone will be successful reproducing the issue and finding a fix. Therefore: - -* Provide reproducable steps, what the result of the steps was, and what you would have expected. -* Description of what you expect to happen -* Animated GIFs -* Code that demonstrates the issue -* Version of Iris -* Errors in the Terminal/Console -* When you have glide/godep installed, can you reproduce the issue when starting Iris' station without these? +Please navigate through https://github.com/iris-contrib/community-board first to read how you can contribute. You're awesome! \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 421e4d59..b135792e 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,24 +1,5 @@ -Please answer these questions before submitting your issue. Thanks! +**Do not create** issues or proposals neither request features **here**. -- [x] I have read the [_examples](https://github.com/kataras/iris/tree/master/_examples), [Contributing File](https://github.com/kataras/iris/blob/master/.github/CONTRIBUTING.md). +Navigate to the https://github.com/iris-contrib/community-board instead. - -### What version of Go are you using, minimum 1.8 (`go version`)? - - -### What operating system and processor architecture are you using (`go env`)? - - -### What version of Iris are you using? - - -### What did you do? - -If possible, provide a recipe for reproducing the error. -A complete runnable program is good. - - -### What did you expect to see? - - -### What did you see instead? +[FAQ](https://github.com/iris-contrib/community-board#community-board) \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8e9730b3..a960e44b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,7 @@ I'd love to see more contributions! -If you are interested in contributing to the Iris project, please read and understand the [Code of Conduct](https://github.com/kataras/iris/blob/master/CODE-OF-CONDUCT.md) before submitting your [PR](https://github.com/kataras/iris/pulls). +Please read [how to create a Proposal](https://github.com/iris-contrib/community-board#creating-a-proposal) first, PR may be rejected if it's not designed as it should. +If you are interested in contributing to the Iris project, please take a time to read and understand the [Code of Conduct](https://github.com/kataras/iris/blob/master/CODE-OF-CONDUCT.md) before submitting your [PR](https://github.com/kataras/iris/pulls), this is how we make Go great. -Don't forget to, first, open an [issue](https://github.com/kataras/iris) to discuss what changes you're willing to push. \ No newline at end of file +Thanks! \ No newline at end of file diff --git a/.gitignore b/.gitignore index 28021e0a..d8f195fa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ # my own configuration for vs code, my lovely editor, if someone of you want this, contact with me .vscode # turn off these for now -.github specs \ No newline at end of file diff --git a/CODE-OF-CONDUCT.md b/CODE-OF-CONDUCT.md index 829bdf6a..75aa17b6 100644 --- a/CODE-OF-CONDUCT.md +++ b/CODE-OF-CONDUCT.md @@ -24,7 +24,7 @@ This code of conduct applies to all repos and communities for kataras-managed op ## Reporting Code of Conduct Issues -We encourage all communities to resolve issues on their own whenever possible. This builds a broader and deeper understanding and ultimately a healthier interaction. In the event that an issue cannot be resolved locally, please feel free to report your concerns by contacting kataras@tutanota.com. +We encourage all communities to resolve issues on their own whenever possible. This builds a broader and deeper understanding and ultimately a healthier interaction. In the event that an issue cannot be resolved locally, please feel free to report your concerns by contacting kataras2006@hotmail.com or kataras@tutanota.com(secure mail). In your report please include: diff --git a/HISTORY.md b/HISTORY.md index 51934559..1edd6792 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -41,6 +41,8 @@ cover the internal changes, the difference is so big that anybody can see them w ## Changes from [v6](https://github.com/kataras/iris/tree/v6) +The whole framework was re-written from zero but I tried to keep the most common public API that iris developers use. + Vendoring /w update The previous vendor action for v6 was done by-hand, now I'm using the [go dep](https://github.com/golang/dep) tool, I had to do @@ -52,17 +54,20 @@ by go dep, but they had lines with the `typealias` feature, which is not ready b - fix "cannot use internal package" at golang/x/net/ipv4 and ipv6 packages - rename the interal folder to was-internal, everywhere and fix its references. - fix "main redeclared in this block" - - remove the examples folder from everywhere. + - remove all examples folders. +- remove main.go files on jsondiff lib, used by gavv/httpexpect, produces errors on `test -v ./...` while jd and jp folders are not used at all. The go dep tool does what is says, as expected, don't be afraid of it now. I am totally recommending this tool for package authors, even if it's in its alpha state. I remember when Iris was in its alpha state and it had 4k stars on its first weeks/or month and that helped me a lot to fix reported bugs by users and make the framework even better, so give love to go dep from today! General + +- Several enhancements for the typescript transpiler, view engine, websocket server and sessions manager - All `Listen` methods replaced with a single `Run` method, see [here](https://github.com/kataras/iris/tree/master/_examples/beginner/listening) - Configuration, easier to modify the defaults, see [here](https://github.com/kataras/iris/tree/master/_examples/beginner/cofiguration) - `HandlerFunc` removed, just `Handler` of `func(context.Context)` where context.Context derives from `import "github.com/kataras/iris/context"` (on August this import path will be optional) - - Simplify API, i.e instead of all these, `Handle,HandleFunc,Use,UseFunc,Done,DoneFunc,UseGlobal,UseGlobalFunc` use `Handle,Use,Done,UseGlobal`. + - Simplify API, i.e: instead of `Handle,HandleFunc,Use,UseFunc,Done,DoneFunc,UseGlobal,UseGlobalFunc` use `Handle,Use,Done,UseGlobal`. - Response time decreased even more (9-35%, depends on the application) - The `Adaptors` idea replaced with a more structural design pattern, but you have to apply these changes: - `app.Adapt(view.HTML/Pug/Amber/Django/Handlebars...)` -> `app.AttachView(view.HTML/Pug/Amber/Django/Handlebars...)` @@ -80,7 +85,7 @@ Routing - `{firstname:alphabetical}`, - `{requestfile:file}` , - `{mylowercaseParam regexp([a-z]+)}`. - - The previous syntax of `:param` and `*param` syntax still working as expected. Previous rules for paths confliction remain as they were. + - The previous syntax of `:param` and `*param` still working as expected. Previous rules for paths confliction remain as they were. - Also, path parameter names should be only alphabetical now, numbers and symbols are not allowed (for your own good, I have seen a lot the last year...). Click [here](https://github.com/kataras/iris/tree/master/_examples/beginner/routing) for details. @@ -91,12 +96,12 @@ Context - in order to be able to use a custom context and/or catch lifetime like `BeginRequest` and `EndRequest` from context itself, see below - `context.JSON, context.JSONP, context.XML, context.Markdown, context.HTML` work faster - `context.Render("filename.ext", bindingViewData{}, options) ` -> `context.View("filename.ext")` - - `View` renders only templates, it will not try to search if you have a restful renderer adapted, because, now, you can do it via method overloading using a custom Context. + - `View` renders only templates, it will not try to search if you have a restful renderer adapted, because, now, you can do it via method overriding using a custom Context. - Able to set `context.ViewData` and `context.ViewLayout` via middleware when executing a template. - `context.SetStatusCode(statusCode)` -> `context.StatusCode(statusCode)` - which is equivalent with the old `EmitError` too: - if status code >=400 given can automatically fire a custom http error handler if response wasn't written already. - - `context.GetStatusCode` -> `context.GetStatusCode()`. + - `context.StatusCode()` -> `context.GetStatusCode()` - `app.OnError` -> `app.OnErrorCode` - Errors per party are removed by-default, you can just use one global error handler with logic like "if path starts with 'prefix' fire this error handler, else...". - Easy way to change Iris' default `Context` with a custom one, see [here](https://github.com/kataras/iris/tree/master/_examples/intermediate/custom-context) @@ -109,7 +114,6 @@ with the status code that user gave with `context.StatusCode` or with `200 OK`, - **the new API is even more easier to read, understand and use.** Server -- Several enhancements for the typescript transpiler, view engine, websocket server and sessions manager - Able to set custom underline *http.Server(s) with new Host (aka Server Supervisor) feature - `Done` and `Err` channels to catch shutdown or any errors on custom hosts, - Schedule custom tasks(with cancelation) when server is running, see [here](https://github.com/kataras/iris/tree/master/_examples/intermediate/graceful-shutdown) diff --git a/README.md b/README.md index b0bb9021..3cd5eb25 100644 --- a/README.md +++ b/README.md @@ -165,9 +165,9 @@ $ rizla main.go I'm sorry for taking this personally but I really need to thanks each one of them because they stood up [♡](https://github.com/kataras/iris#support) for me when others trying to "bullying" my personality in order to deflame Iris. -All of us should read and repsect the official [golang](https://golang.org/conduct) and [iris](CODE-OF-CONDUCT.md) community **Code of Conduct**. This type of commitment and communication is the way of making Go great. +All of us should read and respect the official [golang](https://golang.org/conduct) and [iris](CODE-OF-CONDUCT.md) community **Code of Conduct**. This type of commitment and communication is the way of making Go great. - + [Juan Sebastián Suárez Valencia](https://github.com/Juanses) donated 20 EUR at September 11 of 2016 @@ -229,7 +229,7 @@ Feature Overview ----------- - Focus on high performance -- Build RESTful APIs with our expressionist path syntax, i.e `{userid:int min(1)}`, `{asset:path}`, `{lowercase: regexp([a-z]+)}` +- Build RESTful APIs with our expressionist path syntax, i.e `{userid:int min(1)}`, `{asset:path}`, `{custom regexp([a-z]+)}` - Automatically install and serve certificates from https://letsencrypt.org - Robust routing and middleware ecosystem - Request-Scoped Transactions diff --git a/_examples/advanced/url-shortener/main.go b/_examples/advanced/url-shortener/main.go index 7a0205e7..654b4538 100644 --- a/_examples/advanced/url-shortener/main.go +++ b/_examples/advanced/url-shortener/main.go @@ -13,9 +13,9 @@ import ( "time" "github.com/boltdb/bolt" + "github.com/kataras/iris" "github.com/kataras/iris/context" - "github.com/kataras/iris/view" ) diff --git a/_examples/intermediate/custom-context/method-overriding/main.go b/_examples/intermediate/custom-context/method-overriding/main.go index 9853da1f..b741f5c4 100644 --- a/_examples/intermediate/custom-context/method-overriding/main.go +++ b/_examples/intermediate/custom-context/method-overriding/main.go @@ -17,7 +17,7 @@ import ( // Create your own custom Context, put any fields you wanna need. type MyContext struct { // Optional Part 1: embed (optional but required if you don't want to override all context's methods) - context.Context // it's the internal/Context.go but you don't need to know it. + context.Context // it's the context/context.go#context struct but you don't need to know it. } var _ context.Context = &MyContext{} // optionally: validate on compile-time if MyContext implements context.Context. @@ -60,14 +60,14 @@ func main() { }) // register your route, as you normally do - app.Handle("GET", "/", recordWhichContetsJustForProofOfConcept, func(ctx context.Context) { + app.Handle("GET", "/", recordWhichContextJustForProofOfConcept, func(ctx context.Context) { // use the context's overridden HTML method. ctx.HTML("