From 4a634889488353aa6567747ba29c1ee7e1b2e168 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Thu, 26 Oct 2017 02:48:16 +0300 Subject: [PATCH] Update to version 8.5.4 | Read HISTORY.md https://github.com/kataras/iris/blob/master/HISTORY.md#th-26-october-2017--v854 Former-commit-id: 43a3b46b99085e0e0ed47b281e2f61dbb1ac6eb6 --- .github/CONTRIBUTING.md => CONTRIBUTING.md | 21 + Gopkg.lock | 12 + Gopkg.toml | 8 + HISTORY.md | 12 +- README.md | 194 +++---- README_NEXT.md | 496 ------------------ VERSION | 2 +- .../mvc/login/repositories/user_repository.go | 1 + .../overview/repositories/movie_repository.go | 1 + _examples/overview/main.go | 8 +- .../{users => user}/create_verification.html | 0 .../views/{users => user}/profile.html | 0 context/context.go | 2 + doc.go | 2 +- iris.go | 2 +- iris_the_new_machine.gif | Bin 94951 -> 0 bytes middleware/basicauth/basicauth.go | 2 + version.go | 113 ++-- 18 files changed, 246 insertions(+), 630 deletions(-) rename .github/CONTRIBUTING.md => CONTRIBUTING.md (64%) delete mode 100644 README_NEXT.md rename _examples/overview/views/{users => user}/create_verification.html (100%) rename _examples/overview/views/{users => user}/profile.html (100%) delete mode 100644 iris_the_new_machine.gif diff --git a/.github/CONTRIBUTING.md b/CONTRIBUTING.md similarity index 64% rename from .github/CONTRIBUTING.md rename to CONTRIBUTING.md index 9cca38e7..80c81bd8 100644 --- a/.github/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,12 +14,33 @@ First of all read our [Code of Conduct](https://github.com/kataras/iris/tree/mas 3. Make your changes. 4. Compare & Push the PR from [here](https://github.com/kataras/iris/compare). +## Donate + +Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras) or [BTC](https://iris-go.com/v8/donate)! + +| Name | Amount | Membership | +| -----------|--------|--------| +| [Juan Sebastián Suárez Valencia](https://github.com/Juanses) | 20 EUR | Bronze | +| [Bob Lee](https://github.com/li3p) | 20 EUR | Bronze | +| [Celso Luiz](https://github.com/celsosz) | 50 EUR | **Silver** | +| [Ankur Srivastava](https://github.com/ansrivas) | 20 EUR | Bronze | +| [Damon Zhao](https://github.com/se77en) | 20 EUR | Bronze | +| [Exponity - Tech Company](https://github.com/exponity) | 30 EUR | Bronze | +| [Thomas Fritz](https://github.com/thomasfr) | 25 EUR | Bronze | +| [Thanos V.](http://mykonosbiennale.com/) | 20 EUR | Bronze | +| [George Opritescu](https://github.com/International) | 20 EUR | Bronze | +| [Lex Tang](https://github.com/lexrus) | 20 EUR | Bronze | +| [Bill Q.](https://github.com/hiveminded) | 600 EUR | **Gold** | +| [Conrad Steenberg](https://github.com/hengestone) | 25 EUR | Bronze | + ## Share ### Writing Write an article about Iris in https://medium.com , https://dev.to or if you're being a hackathon at https://hackernoon.com, some examples: +* [How to build a file upload form using DropzoneJS and Go](https://hackernoon.com/how-to-build-a-file-upload-form-using-dropzonejs-and-go-8fb9f258a991) +* [How to display existing files on server using DropzoneJS and Go](https://hackernoon.com/how-to-display-existing-files-on-server-using-dropzonejs-and-go-53e24b57ba19) * [Iris Go vs .NET Core Kestrel in terms of HTTP performance](https://hackernoon.com/iris-go-vs-net-core-kestrel-in-terms-of-http-performance-806195dc93d5) * [Go vs .NET Core in terms of HTTP performance](https://medium.com/@kataras/go-vs-net-core-in-terms-of-http-performance-7535a61b67b8) * [Iris, a modular web framework](https://medium.com/@corebreaker/iris-web-cd684b4685c7) diff --git a/Gopkg.lock b/Gopkg.lock index 537ab7e1..bb1409c6 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -139,6 +139,18 @@ packages = [".","terminal"] revision = "825e39f34365e7db2c9fbc3692c16220e3bd7418" +[[projects]] + branch = "master" + name = "github.com/kataras/survey" + packages = ["."] + revision = "20e139a6d2469769ae88e0a3579ba5df71839ca7" + +[[projects]] + branch = "master" + name = "github.com/skratchdot/open-golang" + packages = ["."] + revision = "75fb7ed4208cf72d323d7d02fd1a5964a7a9073c" + [[projects]] name = "github.com/klauspost/compress" packages = ["flate","gzip"] diff --git a/Gopkg.toml b/Gopkg.toml index cb4afc49..933821f4 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -58,6 +58,14 @@ branch = "master" name = "github.com/kataras/golog" +[[constraint]] + branch = "master" + name = "github.com/kataras/survey" + +[[constraint]] + branch = "master" + name = "github.com/skratchdot/open-golang" + [[constraint]] name = "github.com/klauspost/compress" version = "1.2.1" diff --git a/HISTORY.md b/HISTORY.md index 241a1be7..3a1ef49e 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,7 +2,7 @@ ### Looking for free and real-time support? - http://support.iris-go.com + https://support.iris-go.com https://chat.iris-go.com ### Looking for previous versions? @@ -17,6 +17,14 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene **How to upgrade**: Open your command-line and execute this command: `go get -u github.com/kataras/iris` or let the automatic updater do that for you. +# Th, 26 October 2017 | v8.5.4 + +No new features or fixes (all reported bugs are fixed) in this version, just a tiny improvement. + +- ENHANCEMENT: More friendly version checker! + +> Remember: If you don't want to keep the version checker and you're pretty sure that you will be able to keep your server up-to-date manually, then you can disable the auto updater via; `app.Run(..., iris.WithoutVersionChecker)`. + # Su, 22 October 2017 | v8.5.3 - FIX: [Websocket: memory leak on startPinger](https://github.com/kataras/iris/issues/787) by @jerson with PR: https://github.com/kataras/iris/pull/788 @@ -26,7 +34,7 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whene ### 🎗️ People that you should follow -Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras) or [Bitcoins](https://iris-go.com/v8/donate)! +Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras) or [BTC](https://iris-go.com/v8/donate)! | Name | Amount | Membership | | -----------|--------|--------| diff --git a/README.md b/README.md index 14dacdee..d0d1e30c 100644 --- a/README.md +++ b/README.md @@ -1,76 +1,10 @@ - -# ![Logo created by @santoshanand](logo_white_35_24.png) Iris - -Iris is a fast, simple and efficient micro web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website, API, or distributed app. - - - -Iris may have reached version 8, but we're not stopping there. We have many feature ideas on our board that we're anxious to add and other innovative web development solutions that we're planning to build into Iris. - -[Star](https://github.com/kataras/iris/stargazers) and watch this github repository to stay up to date, we're pushing **new examples every single day!** - -_Psst_, we've produced a small video about your feelings regrating to Iris! You can watch it via youtube at https://www.youtube.com/watch?v=jGx0LkuUs4A. - -[![build status](https://img.shields.io/travis/kataras/iris/master.svg?style=flat-square)](https://travis-ci.org/kataras/iris) -[![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=flat-square)](http://goreportcard.com/report/kataras/iris) -[![github issues](https://img.shields.io/github/issues/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/issues?q=is%3Aopen+is%3Aissue) -[![github closed issues](https://img.shields.io/github/issues-closed-raw/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/issues?q=is%3Aissue+is%3Aclosed) -[![release](https://img.shields.io/github/release/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/releases) -[![view examples](https://img.shields.io/badge/learn%20by-examples-0077b3.svg?style=flat-square)](https://github.com/kataras/iris/tree/master/_examples) -[![chat](https://img.shields.io/badge/community-%20chat-00BCD4.svg?style=flat-square)](https://kataras.rocket.chat/channel/iris) -[![CLA assistant](https://cla-assistant.io/readme/badge/kataras/iris?style=flat-square)](https://cla-assistant.io/kataras/iris) +Learn what [others say about Iris](https://www.youtube.com/watch?v=jGx0LkuUs4A) and [star](https://github.com/kataras/iris/stargazers) this github repository to stay [up to date](https://facebook.com/iris.framework). [![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png)](_benchmarks) @@ -82,11 +16,67 @@ _Psst_, we've produced a small video about your feelings regrating to Iris! You _Updated at: [Friday, 29 September 2017](_benchmarks)_ +We have no doubt you will able to find other web frameworks written in Go +and even put up a real fight to learn and use them for quite some time but +make no mistake, sooner or later you will be using Iris, not because of the ergonomic, high-performant solution that it provides but its well-documented unique features, as these will transform you to a real rockstar geek. + +No matter what you're trying to build, Iris covers +every type of application, from micro services to large monolithic web applications. +It's actually the best piece of software for back-end web developers +you can find online. + +Iris may have reached version 8, but we're not stopping there. We have many feature ideas on our board that we're anxious to add and other innovative web development solutions that we're planning to build into Iris. + +## Built with ♥️ + - Sponsor + Sponsor -

+Accelerated by [KeyCDN](https://www.keycdn.com/), a simple, fast and reliable CDN. + +We are developing this project using the best code editor for Golang; [Visual Studio Code](https://code.visualstudio.com/) supported by [Microsoft](https://www.microsoft.com). + +Iris was built on top of the the [net/http](https://golang.org/pkg/net/http/) package, we own many thanks to [Brad Fitzpatrick](https://github.com/bradfitz) for that. + +If you're coming from [nodejs](https://nodejs.org) world, Iris is the [expressjs](https://github.com/expressjs/express) equivalent for Gophers. + +## Table Of Content + +* [Installation](#installation) +* [Latest changes](#th-26-october-2017--v854) +* [Getting started](#getting-started) +* [Learn](_examples/) + * [MVC (Model View Controller)](_examples/#mvc) **NEW** + * [Structuring](_examples/#structuring) **NEW** + * [HTTP Listening](_examples/#http-listening) + * [Configuration](_examples/#configuration) + * [Routing, Grouping, Dynamic Path Parameters, "Macros" and Custom Context](_examples/#routing-grouping-dynamic-path-parameters-macros-and-custom-context) + * [Subdomains](_examples/#subdomains) + * [Wrap `http.Handler/HandlerFunc`](_examples/#convert-httphandlerhandlerfunc) + * [View](_examples/#view) + * [Authentication](_examples/#authentication) + * [File Server](_examples/#file-server) + * [How to Read from `context.Request() *http.Request`](_examples/#how-to-read-from-contextrequest-httprequest) + * [How to Write to `context.ResponseWriter() http.ResponseWriter`](_examples/#how-to-write-to-contextresponsewriter-httpresponsewriter) + * [Test](_examples/#testing) + * [Cache](_examples/#caching) + * [Sessions](_examples/#sessions) + * [Websockets](_examples/#websockets) + * [Miscellaneous](_examples/#miscellaneous) + * [POC: Convert the medium-sized project "Parrot" from native to Iris](https://github.com/iris-contrib/parrot) + * [POC: Isomorphic react/hot reloadable/redux/css-modules starter kit](https://github.com/kataras/iris-starter-kit) + * [Typescript Automation Tools](typescript/#table-of-contents) + * [Tutorial: A URL Shortener Service using Go, Iris and Bolt](https://medium.com/@kataras/a-url-shortener-service-using-go-iris-and-bolt-4182f0b00ae7) + * [Tutorial: Online Visitors](_examples/tutorial/online-visitors) + * [Tutorial: Caddy](_examples/tutorial/caddy) + * [Tutorial: DropzoneJS Uploader](https://hackernoon.com/how-to-build-a-file-upload-form-using-dropzonejs-and-go-8fb9f258a991) +* [Middleware](middleware/) +* [Dockerize](https://github.com/iris-contrib/cloud-native-go) +* [Contributing](CONTRIBUTING.md) +* [FAQ](FAQ.md) +* [What's next?](#you-are-ready-to-move-to-the-next-step-and-get-closer-to-becoming-a-pro-gopher) +* [People](#people) ## Installation @@ -98,8 +88,6 @@ $ go get -u github.com/kataras/iris Iris takes advantage of the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature. You get truly reproducible builds, as this method guards against upstream renames and deletes. -[Latest changes | v8.5.3](https://github.com/kataras/iris/blob/master/HISTORY.md#su-22-october-2017--v853) - ## Getting Started ```go @@ -316,8 +304,6 @@ func main() { // MoviesController is our /movies controller. type MoviesController struct { - // mvc.C is just a lightweight alternative - // to the "mvc.Controller" controller type. mvc.C } @@ -521,6 +507,7 @@ func (r *movieMemoryRepository) Exec(query Query, action Query, actionLimit int, ok = query(movie) if ok { if action(movie) { + loops++ if actionLimit >= loops { break // break } @@ -785,10 +772,6 @@ import ( // MovieController is our /movies controller. type MovieController struct { - // mvc.C is just a lightweight lightweight alternative - // to the "mvc.Controller" controller type, - // use it when you don't need mvc.Controller's fields - // (you don't need those fields when you return values from the method functions). mvc.C // Our MovieService, it's an interface which @@ -1022,22 +1005,47 @@ func main() { More folder structure guidelines can be found at the [_examples/#structuring](_examples/#structuring) section. -## 😃 Do you like what you learnt so far? +## You are ready to move to the next step and get closer to becoming a pro gopher -> Prepare yourself a cup of coffee, or tea, whatever enjoys you the most! +Congratulations, since you've made it so far, we've crafted just for you some next level content to turn you into a real pro gopher 😃 -- [How to build a file upload form using DropzoneJS and Go](https://hackernoon.com/how-to-build-a-file-upload-form-using-dropzonejs-and-go-8fb9f258a991) -- [How to display existing files on server using DropzoneJS and Go](https://hackernoon.com/how-to-display-existing-files-on-server-using-dropzonejs-and-go-53e24b57ba19) -- [Iris Go vs .NET Core Kestrel in terms of HTTP performance](https://hackernoon.com/iris-go-vs-net-core-kestrel-in-terms-of-http-performance-806195dc93d5) -- [Go vs .NET Core in terms of HTTP performance](https://medium.com/@kataras/go-vs-net-core-in-terms-of-http-performance-7535a61b67b8) -- [Iris, a modular web framework](https://medium.com/@corebreaker/iris-web-cd684b4685c7) -- [Deploying a Iris Golang app in hasura](https://medium.com/@HasuraHQ/deploy-an-iris-golang-app-with-backend-apis-in-minutes-25a559bf530b) -- [How to Turn an Android Device into a Web Server](https://twitter.com/ThePracticalDev/status/892022594031017988) -- [A URL Shortener Service using Go, Iris and Bolt](https://medium.com/@kataras/a-url-shortener-service-using-go-iris-and-bolt-4182f0b00ae7) -- [Why I preferred Go over Node.js for simple Web Application](https://medium.com/@tigranbs/why-i-preferred-go-over-node-js-for-simple-web-application-d4a549e979b9) +> Don't forget to prepare yourself a cup of coffee, or tea, whatever enjoys you the most! -Take some time, `don't say we didn't warn you`, and continue your journey by [navigating to the next README page](README_NEXT.md). +* [How to build a file upload form using DropzoneJS and Go](https://hackernoon.com/how-to-build-a-file-upload-form-using-dropzonejs-and-go-8fb9f258a991) +* [How to display existing files on server using DropzoneJS and Go](https://hackernoon.com/how-to-display-existing-files-on-server-using-dropzonejs-and-go-53e24b57ba19) +* [Iris, a modular web framework](https://medium.com/@corebreaker/iris-web-cd684b4685c7) +* [Go vs .NET Core in terms of HTTP performance](https://medium.com/@kataras/go-vs-net-core-in-terms-of-http-performance-7535a61b67b8) +* [Iris Go vs .NET Core Kestrel in terms of HTTP performance](https://hackernoon.com/iris-go-vs-net-core-kestrel-in-terms-of-http-performance-806195dc93d5) +* [How to Turn an Android Device into a Web Server](https://twitter.com/ThePracticalDev/status/892022594031017988) +* [Deploying a Iris Golang app in hasura](https://medium.com/@HasuraHQ/deploy-an-iris-golang-app-with-backend-apis-in-minutes-25a559bf530b) +* [A URL Shortener Service using Go, Iris and Bolt](https://medium.com/@kataras/a-url-shortener-service-using-go-iris-and-bolt-4182f0b00ae7) + +## People + +The author of Iris is [@kataras](https://github.com/kataras), you can reach him via; + +* [Medium](https://medium.com/@kataras) +* [Twitter](https://twitter.com/makismaropoulos) +* [Dev.to](https://dev.to/@kataras) +* [Facebook](https://facebook.com/iris.framework) +* [Mail](mailto:kataras2006@hotmail.com?subject=Iris%20I%20need%20some%20help%20please) + +[List of all Authors](AUTHORS) + +[List of all Contributors](https://github.com/kataras/iris/graphs/contributors) + +Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras) or [BTC](https://iris-go.com/v8/donate)! + +### 03, October 2017 | Iris User Experience Report + +Be part of the **first** Iris User Experience Report by submitting a simple form, it won't take more than **2 minutes**. + +The form contains some questions that you may need to answer in order to learn more about you; learning more about you helps us to serve you with the best possible way! + +https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link ## License -Iris is licensed under the 3-Clause BSD [License](LICENSE). Iris is 100% open-source software. \ No newline at end of file +Iris is licensed under the 3-Clause BSD [License](LICENSE). Iris is 100% open-source software. + +For any questions regarding the license please [contact us](mailto:kataras2006@hotmail.com?subject=Iris%20License). \ No newline at end of file diff --git a/README_NEXT.md b/README_NEXT.md deleted file mode 100644 index a6e862a9..00000000 --- a/README_NEXT.md +++ /dev/null @@ -1,496 +0,0 @@ - - -# 03, October 2017 | Iris User Experience Report - -Be part of the **first** Iris User Experience Report by submitting a simple form, it won't take more than **2 minutes**. - -The form contains some questions that you may need to answer in order to learn more about you; learning more about you helps us to serve you with the best possible way! - -https://docs.google.com/forms/d/e/1FAIpQLSdCxZXPANg_xHWil4kVAdhmh7EBBHQZ_4_xSZVDL-oCC_z5pA/viewform?usp=sf_link - -Iris User Experience Report - Header - -

- -

- -Iris is a fast, simple and efficient micro web framework for Go. It provides a beautifully expressive and easy to use foundation for your next website, API, or distributed app. - -We have no doubt you will able to find other web frameworks written in Go -and even put up a real fight to learn and use them for quite some time but -make no mistake, sooner or later you will be using Iris, not because of the ergonomic, high-performant solution that it provides but its well-documented unique features, as these will transform you to a real rockstar geek. - -No matter what you're trying to build, Iris covers -every type of application, from micro services to large monolithic web applications. -It's actually the best piece of software for back-end web developers -you can find online. - -Iris may have reached version 8, but we're not stopping there. We have many feature ideas on our board that we're anxious to add and other innovative web development solutions that we're planning to build into Iris. - -Iris was built on top of the the [net/http](https://golang.org/pkg/net/http/) package, we own many thanks to [Brad Fitzpatrick](https://github.com/bradfitz) for that. - -If you're coming from Node.js world, this is the expressjs equivalent for the Go Programming Language.
- -**Accelerated** by [KeyCDN](https://www.keycdn.com/), A Simple, Fast and Reliable CDN. - -**We are developing** this project using the best code editor for Golang; [Visual Studio Code](https://code.visualstudio.com/) supported by [Microsoft](https://www.microsoft.com). - -[Star](https://github.com/kataras/iris/stargazers) and watch this github repository to stay up to date. - - -[![build status](https://img.shields.io/travis/kataras/iris/master.svg?style=flat-square)](https://travis-ci.org/kataras/iris) -[![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=flat-square)](http://goreportcard.com/report/kataras/iris) -[![github issues](https://img.shields.io/github/issues/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/issues?q=is%3Aopen+is%3Aissue) -[![github closed issues](https://img.shields.io/github/issues-closed-raw/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/issues?q=is%3Aissue+is%3Aclosed) -[![release](https://img.shields.io/github/release/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/releases) -[![view examples](https://img.shields.io/badge/learn%20by-examples-0077b3.svg?style=flat-square)](https://github.com/kataras/iris/tree/master/_examples) -[![chat](https://img.shields.io/badge/community-%20chat-00BCD4.svg?style=flat-square)](https://kataras.rocket.chat/channel/iris) - - - - -![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png) - -
-Benchmarks from third-party source over the rest web frameworks - -![Comparison with other frameworks](https://raw.githubusercontent.com/smallnest/go-web-framework-benchmark/4db507a22c964c9bc9774c5b31afdc199a0fe8b7/benchmark.png) - -
- -_Updated at: [Friday, 29 September 2017](_benchmarks)_ - -

- -### [🎗️](#-people) Legends - -Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras)! - -| Name | Amount | Membership | -| -----------|--------|--------| -| [Juan Sebastián Suárez Valencia](https://github.com/Juanses) | 20 EUR | Bronze | -| [Bob Lee](https://github.com/li3p) | 20 EUR | Bronze | -| [Celso Luiz](https://github.com/celsosz) | 50 EUR | **Silver** | -| [Ankur Srivastava](https://github.com/ansrivas) | 20 EUR | Bronze | -| [Damon Zhao](https://github.com/se77en) | 20 EUR | Bronze | -| [Exponity - Tech Company](https://github.com/exponity) | 30 EUR | Bronze | -| [Thomas Fritz](https://github.com/thomasfr) | 25 EUR | Bronze | -| [Thanos V.](http://mykonosbiennale.com/) | 20 EUR | Bronze | -| [George Opritescu](https://github.com/International) | 20 EUR | Bronze | -| [Lex Tang](https://github.com/lexrus) | 20 EUR | Bronze | -| [Bill Q.](https://github.com/hiveminded) | 600 EUR | **Gold** | -| [Conrad Steenberg](https://github.com/hengestone) | 25 EUR | Bronze | - -_Psst_, we've produced a small video about your feelings regrating to Iris! You can watch the video at https://www.youtube.com/watch?v=jGx0LkuUs4A. - -### 📑 Table Of Content - -* [Installation](#-installation) -* [Latest changes](https://github.com/kataras/iris/blob/master/HISTORY.md#th-12-october-2017--v852) -* [Learn](#-learn) - * [Structuring](_examples/#structuring) - * [HTTP Listening](_examples/#http-listening) - * [Configuration](_examples/#configuration) - * [Routing, Grouping, Dynamic Path Parameters, "Macros" and Custom Context](_examples/#routing-grouping-dynamic-path-parameters-macros-and-custom-context) - * [MVC (Model View Controller)](_examples/#mvc) **NEW** - * [Subdomains](_examples/#subdomains) - * [Wrap `http.Handler/HandlerFunc`](_examples/#convert-httphandlerhandlerfunc) - * [View](_examples/#view) - * [Authentication](_examples/#authentication) - * [File Server](_examples/#file-server) - * [How to Read from `context.Request() *http.Request`](_examples/#how-to-read-from-contextrequest-httprequest) - * [How to Write to `context.ResponseWriter() http.ResponseWriter`](_examples/#how-to-write-to-contextresponsewriter-httpresponsewriter) - * [Test](_examples/#testing) - * [Cache](_examples/#caching) - * [Sessions](_examples/#sessions) - * [Websockets](_examples/#websockets) - * [Miscellaneous](_examples/#miscellaneous) - * [POC: Convert the medium-sized project "Parrot" from native to Iris](https://github.com/iris-contrib/parrot) - * [POC: Isomorphic react/hot reloadable/redux/css-modules starter kit](https://github.com/kataras/iris-starter-kit) - * [Typescript Automation Tools](typescript/#table-of-contents) - * [Tutorial: Online Visitors](_examples/tutorial/online-visitors) - * [Tutorial: Caddy](_examples/tutorial/caddy) - * [Tutorial: DropzoneJS Uploader](_examples/tutorial/dropzonejs) -* [Middleware](middleware/) -* [Dockerize](https://github.com/iris-contrib/cloud-native-go) -* [Community & Support](#-community) -* [Blogs](https://iris-go.com/v8/blogs) - - [How to build a file upload form using DropzoneJS and Go](https://hackernoon.com/how-to-build-a-file-upload-form-using-dropzonejs-and-go-8fb9f258a991) - - [How to display existing files on server using DropzoneJS and Go](https://hackernoon.com/how-to-display-existing-files-on-server-using-dropzonejs-and-go-53e24b57ba19) - - [Iris Go vs .NET Core Kestrel in terms of HTTP performance](https://hackernoon.com/iris-go-vs-net-core-kestrel-in-terms-of-http-performance-806195dc93d5) - - [Go vs .NET Core in terms of HTTP performance](https://medium.com/@kataras/go-vs-net-core-in-terms-of-http-performance-7535a61b67b8) - - [Iris, a modular web framework](https://medium.com/@corebreaker/iris-web-cd684b4685c7) - - [Deploying a Iris Golang app in hasura](https://medium.com/@HasuraHQ/deploy-an-iris-golang-app-with-backend-apis-in-minutes-25a559bf530b) - - [How to Turn an Android Device into a Web Server](https://twitter.com/ThePracticalDev/status/892022594031017988) - - [A URL Shortener Service using Go, Iris and Bolt](https://medium.com/@kataras/a-url-shortener-service-using-go-iris-and-bolt-4182f0b00ae7) - - [Why I preferred Go over Node.js for simple Web Application](https://medium.com/@tigranbs/why-i-preferred-go-over-node-js-for-simple-web-application-d4a549e979b9) -* [Versioning](#-version) -* [People](#-people) - -### 🚀 Installation - -The only requirement is the [Go Programming Language](https://golang.org/dl/), at least version 1.8, but **1.9** is highly recommended. [Docs](https://docs.iris-go.com) and [Examples](_examples) are written using the go 1.9 version. - -```sh -$ go get -u github.com/kataras/iris -``` - -> _iris_ takes advantage of the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature. You get truly reproducible builds, as this method guards against upstream renames and deletes. - -```go -// file: main.go -package main -import "github.com/kataras/iris" - -func main() { - app := iris.New() - // Load all templates from the "./views" folder - // where extension is ".html" and parse them - // using the standard `html/template` package. - app.RegisterView(iris.HTML("./views", ".html")) - - // Method: GET - // Resource: http://localhost:8080 - app.Get("/", func(ctx iris.Context) { - // Bind: {{.message}} with "Hello world!" - ctx.ViewData("message", "Hello world!") - // Render template file: ./views/hello.html - ctx.View("hello.html") - }) - - // Method: GET - // Resource: http://localhost:8080/user/42 - // - // Need to use a custom regexp instead? - // Easy; - // Just mark the parameter's type to 'string' - // which accepts anything and make use of - // its `regexp` macro function, i.e: - // app.Get("/user/{id:string regexp(^[0-9]+$)}") - app.Get("/user/{id:long}", func(ctx iris.Context) { - userID, _ := ctx.Params().GetInt64("id") - ctx.Writef("User ID: %d", userID) - }) - - // Start the server using a network address. - app.Run(iris.Addr(":8080")) -} -``` - -> See all available path parameter types at: https://github.com/kataras/iris/blob/master/_examples/routing/dynamic-path/main.go#L31 - -```html - - - - Hello Page - - -

{{.message}}

- - -``` - -```sh -$ go run main.go -> Now listening on: http://localhost:8080 -> Application started. Press CTRL+C to shut down. -``` - -> Wanna re-start your app automatically when source code changes happens? Install the [rizla](https://github.com/kataras/rizla) tool and run `rizla main.go` instead of `go run main.go`. - -Examples and docs are updated to Go 1.9, please refer to [that FAQ section](https://github.com/kataras/iris/blob/master/faq.md#type-aliases). - -
-Hello World with Go 1.8 - -Iris declares all of its type alias at the same file in order to be easy to be discovered. - -> If you just upgraded to go 1.9 from 1.8 you can always search for a compatible type alias at the [context.go](context.go) file and opposite, if you use go 1.8 and you're new to Iris you can see [that](context.go) file to see the compatible packages. - -If Go 1.8 remains the basic host for your go apps then you should declare and use the `github.com/kataras/iris/context` package on your source file's imports statement. - -```go -package main - -import ( - "github.com/kataras/iris" - "github.com/kataras/iris/context" -) - -func main() { - app := iris.New() - app.RegisterView(iris.HTML("./templates", ".html")) - - app.Get("/", func(ctx context.Context) { - ctx.ViewData("message", "Hello world!") - ctx.View("hello.html") - }) - - app.Run(iris.Addr(":8080")) -} -``` - -
- -
-Fan of the MVC Architectural Pattern? Click here - -```go -package main - -import "github.com/kataras/iris" - -func main() { - app := iris.New() - app.RegisterView(iris.HTML("./views", ".html")) - - app.Controller("/", new(Controller)) - - app.Run(iris.Addr(":8080")) -} - -type Controller struct { - iris.Controller -} - -// Method: GET -// Resource: http://localhost:8080 -func (c *Controller) Get() { - c.Data["message"] = "Hello world!" - c.Tmpl = "hello.html" -} - -// Method: GET -// Resource: http://localhost:8080/user/42 -func (c *Controller) GetUserBy(id int64) { - c.Ctx.Writef("User ID: %d", id) -} -``` - -
- -
-Why a new web framework - -### Why - -Go is a great technology stack for building scalable, web-based, back-end systems for web -applications. - -When you think about building web applications and web APIs, or simply building HTTP servers in Go, does your mind go to the standard net/http package? -Then you have to deal with some common situations like dynamic routing (a.k.a parameterized), security and authentication, real-time communication and many other issues that net/http doesn't solve. - -The net/http package is not complete enough to quickly build well-designed back-end web systems. When you realize this, you might be thinking along these lines: - -- Ok, the net/http package doesn't suit me, but there are so many frameworks, which one will work for me?! -- Each one of them tells me that it is the best. I don't know what to do! - -##### The truth - -I did some deep research and benchmarks with 'wrk' and 'ab' in order to choose which framework would suit me and my new project. The results, sadly, were really disappointing to me. - -I started wondering if golang wasn't as fast on the web as I had read... but, before I let Golang go and continued to develop with nodejs, I told myself: - -> '**Makis, don't lose hope, give at least a chance to Golang. Try to build something totally new without basing it off the "slow" code you saw earlier; learn the secrets of this language and make *others* follow your steps!**'. - -These are the words I told myself that day [**13 March 2016**]. - -The same day, later the night, I was reading a book about Greek mythology. I saw an ancient goddess' name and was inspired immediately to give a name to this new web framework (which I had already started writing) - **Iris**. - - I'm still here [because Iris has succeed in being the fastest go web framework](https://raw.githubusercontent.com/smallnest/go-web-framework-benchmark/4db507a22c964c9bc9774c5b31afdc199a0fe8b7/benchmark.png) - -[![](http://comments.iris-go.com/screens/comment37.png)](https://twitter.com/ThePracticalDev/status/892022594031017988) - -![](https://comments.iris-go.com/comment36.png) - -![](https://comments.iris-go.com/comment35.png) - -![](https://comments.iris-go.com/comment34.png) - -![](https://comments.iris-go.com/comment2.png) - -![](https://comments.iris-go.com/comment30.png) - -![](https://comments.iris-go.com/comment31.png) - -![](https://comments.iris-go.com/comment32.png) - -![](https://comments.iris-go.com/comment33.png) - -![](https://comments.iris-go.com/comment26.png) - -![](https://comments.iris-go.com/comment1.png) - -![](https://comments.iris-go.com/comment3.png) - -![](https://comments.iris-go.com/comment8.png) - -![](https://comments.iris-go.com/comment12.png) - -![](https://comments.iris-go.com/comment13.png) - -![](https://comments.iris-go.com/comment14.png) - -![](https://comments.iris-go.com/comment17.png) - -![](https://comments.iris-go.com/comment21.png) - -![](https://comments.iris-go.com/comment22.png) - -![](https://comments.iris-go.com/comment24.png) - -![](https://comments.iris-go.com/comment27.png) - ----- - -_iris_ is easy, it has a familiar API while in the same has far more features than [Gin](https://github.com/gin-gonic/gin) or [Martini](https://github.com/go-martini/martini). - -You own your code —it will never generate (unfamiliar) code for you, like [Beego](https://github.com/astaxie/beego), [Revel](https://github.com/revel/revel) and [Buffalo](https://github.com/gobuffalo/buffalo) do. - -It's not just-another-router but its overall performance is equivalent with something like [httprouter](https://github.com/julienschmidt/httprouter). - -Unlike [fasthttp](https://github.com/valyala/fasthttp), iris provides full HTTP/2 support for free. - -Compared to the rest open source projects, this one is very active and you get answers almost immediately. - -### 🔥 Hot Features - -- Focus on high performance -- Easy Fluent API -- Highly customizable -- Robust routing and middleware ecosystem - * Build RESTful APIs with iris unique expressionist path interpreter - * Dynamic path parameterized or wildcard routes are not conflict with static routes - * Remove trailing slash from the URL with option to redirect - * Virtual hosts and subdomains made easy - * Group API's and static or even dynamic subdomains - * MVC [**NEW**](_examples/mvc) - * `net/http` and `negroni-like` handlers are compatible via `iris.FromStd` - * Register custom handlers for any HTTP error - * Transactions and rollback when you need it - * Cache the response when you need it - * A single function to serve your embedded assets, always compatible with `go-bindata` - * HTTP to HTTPS - * HTTP to HTTPS WWW - * [learn the reasons that differ from what you've seen so far](_examples/#routing-grouping-dynamic-path-parameters-macros-and-custom-context) -- Context - * Highly scalable rich content render (Markdown, JSON, JSONP, XML...) - * Body binders and handy functions to send HTTP responses - * Limit request body - * Serve static resources or embedded assets - * Localization i18N - * Compression (Gzip is built'n) -- Authentication - * Basic Authentication - * OAuth, OAuth2 supporting 27+ popular websites - * JWT -- Server - * Automatically install and serve certificates from https://letsencrypt.org when serving via TLS - * Gracefully shutdown by-default - * Register on shutdown, error or interrupt events - * Attach more than one server, fully compatible with `net/http#Server` -- View system: supporting 5 template engines. Fully compatible with `html/template` -- HTTP Sessions library [you can still use your favorite if you want to] -- Websocket library, its API similar to socket.io [you can still use your favorite if you want to] -- Hot Reload on source code changes[*](https://github.com/kataras/rizla) -- Typescript integration + Web IDE -- And many other things that will surprise you - -
- -### 📖 Learn - - - - - -The _iris_ philosophy is to provide robust tooling for HTTP, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs. Keep note that, today, iris is faster than apache+nginx itself. - -_iris_ does not force you to use any specific ORM. With support for the most popular template engines, websocket server and a fast sessions manager you can quickly craft your perfect application. - -The awesome _iris_ community is always adding new examples, [_examples](_examples/) is a great place to get started! - -Read the [godocs](https://godoc.org/github.com/kataras/iris) for a better understanding. - -### 👥 Community - -Join the welcoming community of fellow _iris_ developers in [rocket.chat](https://kataras.rocket.chat/channel/iris) - -- [Post](http://support.iris-go.com) a feature request or report a bug -- :star: and watch the public [repository](https://github.com/kataras/iris/stargazers), will keep you up to date -- :earth_americas: publish [an article](https://medium.com/search?q=iris) or share a [tweet](https://twitter.com/hashtag/golang) about your personal experience with iris. - -The most useful community repository for _iris_ developers is the -[iris-contrib/middleware](https://github.com/iris-contrib/middleware) which contains some HTTP handlers that can help you finish a lot of your tasks even easier. Feel free to push your own middleware there! - -```sh -$ go get -u github.com/iris-contrib/middleware/... -``` - -#### 📈 One and a half years... - -[![total used by](https://iris-go.com/graph?style=flat-square)]() - -Iris exceeded all expectations, started as one-man project. - -- 7300 github stars -- 778 github forks -- 1m total views at its documentation -- ~819$ at donations, small amount for the work we put here but it's a good start -- ~557 reported bugs fixed -- ~30 community feature requests have been implemented - -### 📌 Version - -Current: [VERSION](VERSION) - -Each new release is pushed to the master. It stays there until the next version. When a next version is released then the previous version goes to its own branch with `gopkg.in` as its import path (and its own vendor folder), in order to keep it working "for-ever". - -Changelog of the current version can be found at the [HISTORY](HISTORY.md) file. - -#### Should I upgrade my iris? - -Developers are not forced to use the latest _iris_ version, they can use any version in production, they can update at any time they want. - -Testers should upgrade immediately, if you're willing to use _iris_ in production you can wait a little more longer, transaction should be as safe as possible. - -#### Where can I find older versions? - -Previous versions can be found at [releases page](https://github.com/kataras/iris/releases). - - - -### 🥇 People - -The original author of _Iris_ is [@kataras](https://github.com/kataras), you can reach him via -- [Medium](https://medium.com/@kataras) -- [Twitter](https://twitter.com/makismaropoulos) -- [Dev.to](https://dev.to/@kataras) -- [Facebook](https://facebook.com/kataras.gopher) -- [Mail](mailto:kataras2006@hotmail.com?subject=Iris%20I%20need%20some%20help%20please) - -[List of all Authors](AUTHORS) - -[List of all Contributors](https://github.com/kataras/iris/graphs/contributors) - -Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras)! - -[![](https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png)](https://www.paypal.me/kataras/20) - -## License - -This software is licensed under the open-source 3-Clause BSD. - -You can find the license file [here](LICENSE), for any questions regarding the license please [contact](mailto:kataras2006@hotmail.com?subject=Iris%20License) us. \ No newline at end of file diff --git a/VERSION b/VERSION index 2b0d7b6d..bea42d32 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.5.3:https://github.com/kataras/iris/blob/master/HISTORY.md#su-22-october-2017--v853 \ No newline at end of file +8.5.4:https://github.com/kataras/iris/blob/master/HISTORY.md#th-26-october-2017--v854 \ No newline at end of file diff --git a/_examples/mvc/login/repositories/user_repository.go b/_examples/mvc/login/repositories/user_repository.go index 60c3dd91..490f3de0 100644 --- a/_examples/mvc/login/repositories/user_repository.go +++ b/_examples/mvc/login/repositories/user_repository.go @@ -58,6 +58,7 @@ func (r *userMemoryRepository) Exec(query Query, action Query, actionLimit int, ok = query(user) if ok { if action(user) { + loops++ if actionLimit >= loops { break // break } diff --git a/_examples/mvc/overview/repositories/movie_repository.go b/_examples/mvc/overview/repositories/movie_repository.go index c53ec425..8b85ed09 100644 --- a/_examples/mvc/overview/repositories/movie_repository.go +++ b/_examples/mvc/overview/repositories/movie_repository.go @@ -60,6 +60,7 @@ func (r *movieMemoryRepository) Exec(query Query, action Query, actionLimit int, ok = query(movie) if ok { if action(movie) { + loops++ if actionLimit >= loops { break // break } diff --git a/_examples/overview/main.go b/_examples/overview/main.go index e7d34193..f6834ff9 100644 --- a/_examples/overview/main.go +++ b/_examples/overview/main.go @@ -88,9 +88,9 @@ func profileByUsername(ctx iris.Context) { // .Params are used to get dynamic path parameters. username := ctx.Params().Get("username") ctx.ViewData("Username", username) - // renders "./views/users/profile.html" + // renders "./views/user/profile.html" // with {{ .Username }} equals to the username dynamic path parameter. - ctx.View("users/profile.html") + ctx.View("user/profile.html") } func getUserByID(ctx iris.Context) { @@ -109,8 +109,8 @@ func createUser(ctx iris.Context) { ctx.StatusCode(iris.StatusInternalServerError) return } - // renders "./views/users/create_verification.html" + // renders "./views/user/create_verification.html" // with {{ . }} equals to the User object, i.e {{ .Username }} , {{ .Firstname}} etc... ctx.ViewData("", user) - ctx.View("users/create_verification.html") + ctx.View("user/create_verification.html") } diff --git a/_examples/overview/views/users/create_verification.html b/_examples/overview/views/user/create_verification.html similarity index 100% rename from _examples/overview/views/users/create_verification.html rename to _examples/overview/views/user/create_verification.html diff --git a/_examples/overview/views/users/profile.html b/_examples/overview/views/user/profile.html similarity index 100% rename from _examples/overview/views/users/profile.html rename to _examples/overview/views/user/profile.html diff --git a/context/context.go b/context/context.go index 47a2e05e..bf946d42 100644 --- a/context/context.go +++ b/context/context.go @@ -279,6 +279,7 @@ type Context interface { // func(c *UsersController) Get() []models.User { // return c.Service.GetAll() //} + // Alternative way is `!ctx.IsStopped()` if middleware make use of the `ctx.StopExecution()` on failure. Proceed(Handler) bool // HandlerName returns the current handler's name, helpful for debugging. HandlerName() string @@ -1043,6 +1044,7 @@ func (ctx *context) HandlerIndex(n int) (currentIndex int) { // func(c *UsersController) Get() []models.User { // return c.Service.GetAll() //} +// Alternative way is `!ctx.IsStopped()` if middleware make use of the `ctx.StopExecution()` on failure. func (ctx *context) Proceed(h Handler) bool { beforeIdx := ctx.currentHandlerIndex h(ctx) diff --git a/doc.go b/doc.go index 2ee91f13..814db6e2 100644 --- a/doc.go +++ b/doc.go @@ -35,7 +35,7 @@ Source code and other details for the project are available at GitHub: Current Version -8.5.3 +8.5.4 Installation diff --git a/iris.go b/iris.go index 86ab8f89..c97b58b4 100644 --- a/iris.go +++ b/iris.go @@ -32,7 +32,7 @@ import ( const ( // Version is the current version number of the Iris Web Framework. - Version = "8.5.3" + Version = "8.5.4" ) // HTTP status codes as registered with IANA. diff --git a/iris_the_new_machine.gif b/iris_the_new_machine.gif deleted file mode 100644 index 8281974a4e966c810e1ceeff1bea20bbf186f8ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 94951 zcmeFa2V7I>wm!TQ2!tMLXhP^k5JVKLgx;kWDN>|c07b!q1_T0FDAGj#2wY8<|1=G8!^x(?q=xBQPoVd6+9FX;3S>WH_0&;YowWiKa#)kH$ zI*YW~FmT3lpV`?t;j0FE_Nbd6_<00_m$qo2b?nCrt9$h{6knzi6s!s@8cVJm5ML5@ zzo)UZJB?(VDs6eHtoMkjQ;k>esq$;N+8g=`El*cmKdQg&`TgG0l>@ zEhitGkNN5OgKI7I<82f+9vPd~hDVo^g%_^xZ*83FPFJu#Zgck3<7;_KHa_e>dwOPo zW_&=#_FU7m+f`1r>#v_{elgOp;o5QA^JiY&Yu)zZ;q~(^v*Ydid1TjKXni}?b7Y~< zjSFXgnz>nOU9|S%xeqT!Pj4K*aq;}z?8N2y1G09PF69%w5-Ek&!2;R^|Fr13^el|FE0)myg z6je->NE&sd%Ipo9v{I;WpG;LP&MQgPE*P3TsC7p_^Wc(ORU0hyKIToO$-EscO*7dl zGM!c*VRu?15ttFQ&J9@GMZpHArUVuc^2eTJ zcy~U#S+Fhj8RZyXZ+>tZ-%U`pAIfw!ckCVn4q&_syI!osj5tEg@+oF z;a@O`OLk3-t8@rE_pG|AqUL!`-I?dlYgHSrs=ugfx)b)|MC+597bh=#eEy=oonzt4 zhAy#pFA+0Xn^#t|CCMw1cm7yGpu% z9$i3%t|vgRcSGYYJVxkrw|aUoBj~mS(*+FZ2D$X`HhLSxXx4*efj_GSzJ<;R8igD8 zYv^32sBOpyok1enh#}?>gw6{VBr?LLfQHV&vhHl{4Vk*3LgoEO^@Y!reb%WQII0wS z=c{GbW2AVIftWY9j_R!=Hl^$De{QNAsue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i&Pgw>O9(ESWF#s?19CMU?VZOiazO!1c$H#L<1}Xbc>n6W;rlurGpwFzxu~^x)0zJ zY#}1DLAIfBVJocXfWQ{Wzn>4_Mt-+WvcZ2+IU@MQnRz2>|V5_3XU`Riige^A* z^P3Ee$0IVZA|A#Y!FWa32)r?y?)MTM|Fnq!VGB8r@;s+Lfz)pe0#P#g+4Ev~C zf4V%u(_@^3{3)FBI4VyKmZs7EE=NVw;NNV!OY9g~<-PF^XP4rrjH7N$yd-1c%#G&F zC)Vawv`W_>H?Q5ezLYF&SmoKUWuLx7H&xFSKUsD2$Lvi^459>gmBDE-i0)g~1;?bp zG2kQ{paBCAmrXkDt2i)djLoTnV}K{W9W~oej|ci2A0+`)-6BpSCPNS*r^Y;TN-|EL z#H-#Hl2ayPv*$OM)RZWQrliD=`&?5Z=T|@XC=k6Cw>??n8LfVUZyT9q7;(2|^RL+{ z{q(U;0*)%ZnCqK>m;^c}gJRk#(>+MGf)-W4CehUOjo&(Sc+)ikghC!@ zseD*&%9YBkjUh;Loe?1A8o62gOKM|G2e_b>u5K_0bJ|TTS#t19WGr;t?x5BcqLd~l z&Zl$NavN8j?pjRm8C5M;zy8z4T^+5RPS3s1>z2L5eavW%ZHiweOPDeha+_Rywl79q z_tW)(MaTWmblr=gu6y*+L?bX6f&X{c{qGk@)a{Eti_O)>aIL;gKu|($`qTAc{&vSrD45iXxLHvzVB#l zSog$ %s].\nRelease notes: %s.\nUpdate now?", + v.Version, Version, + v.ChangelogURL) + + qs = append(qs, &survey.Question{ + Name: "shouldUpdateNow", + Prompt: &survey.Confirm{ + Message: shouldUpdateNowMsg, + Help: ignoreUpdatesMsg, + }, + Validate: survey.Required, + }) } - format += "Update now?[%s]: " + // firs time and update available is not relative because if no update often server will decide when to ask this, + // so separate the actions and if statements here. + if v.FirstTime { + // if first time that this server was updated then ask if enjoying the framework. + qs = append(qs, &survey.Question{ + Name: "enjoyingIris", + Prompt: &survey.Confirm{ + Message: "Enjoying Iris Framework?", + Help: "yes or no", + }, + Validate: survey.Required, + }) + } - // currentVersion.LessThan(latestVersion) - updaterYesInput := [...]string{"y", "yes"} + // Ask if should update(if available) and enjoying iris(if first time) in the same survey. + ans := struct { + ShouldUpdateNow bool `survey:"shouldUpdateNow"` + EnjoyingIris bool `survey:"enjoyingIris"` + }{} - golog.Warnf(format, v.Version, Version, - v.ChangelogURL, - updaterYesInput[0]+"/n") + survey.Ask(qs, &ans) - silent := false - - sc := bufio.NewScanner(os.Stdin) - - shouldUpdate := silent - - if !silent { - if sc.Scan() { - inputText := sc.Text() - - for _, s := range updaterYesInput { - if inputText == s { - shouldUpdate = true - } + if ans.EnjoyingIris { + // if the answer to the previous survey about enjoying the framework + // was positive then do the survey (currently only one question and its action). + qs2 := []*survey.Question{ + { + Name: "starNow", + Prompt: &survey.Confirm{ + Message: "Would you mind giving us a star on GitHub? It really helps us out! Thanks for your support:)", + Help: "Its free so let's do that, type 'y'", + }, + Validate: survey.Required, + }, + /* any future questions should be here, at this second survey. */ + } + ans2 := struct { + StarNow bool `survey:"starNow"` + }{} + survey.Ask(qs2, &ans2) + if ans2.StarNow { + starRepo := "https://github.com/kataras/iris/stargazers" + if err := open.Run(starRepo); err != nil { + golog.Warnf("tried to open the browser for you but failed, please give us a star at: %s\n", starRepo) } } } - if !shouldUpdate { - golog.Infof("Ignore updates? Disable version checker via:\napp.Run(..., iris.WithoutVersionChecker)") - return - } - - if shouldUpdate { + // run the updater last, so the user can star the repo and at the same time + // the app will update her/his local iris. + if ans.ShouldUpdateNow { // it's true only when update was available and user typed "yes". repo := "github.com/kataras/iris/..." cmd := exec.Command("go", "get", "-u", "-v", repo) cmd.Stdout = os.Stdout @@ -109,6 +156,8 @@ func checkVersion() { return } - golog.Infof("Update process finished.\nManual rebuild and restart is required to apply the changes...") + golog.Infof("Update process finished.\nManual rebuild and restart is required to apply the changes...\n") + } else { + golog.Infof(ignoreUpdatesMsg) } }