From 452b7d2df0a22c1ad0630a93c6ad50393c565807 Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Fri, 19 Jul 2019 12:27:35 +0300 Subject: [PATCH] minor Former-commit-id: f0a26383ace695525d5aec52ec2181d781d26a83 --- .gitattributes | 3 +-- HISTORY.md | 2 -- README.md | 8 +++----- README_GR.md | 4 +--- README_ID.md | 2 -- README_JPN.md | 2 -- README_PT_BR.md | 2 -- README_RU.md | 4 +++- README_ZH.md | 2 -- _examples/README.md | 2 +- go.mod | 2 +- go.sum | 25 +++++++++++++++++++++++++ iris.go | 17 ++--------------- 13 files changed, 37 insertions(+), 38 deletions(-) create mode 100644 go.sum diff --git a/.gitattributes b/.gitattributes index cb28be50..9b04f1bc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,4 @@ *.go linguist-language=Go -vendor/* linguist-vendored _examples/* linguist-documentation _benchmarks/* linguist-documentation # Set the default behavior, in case people don't have core.autocrlf set. @@ -10,4 +9,4 @@ _benchmarks/* linguist-documentation # https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings * text=auto # ignore perms -# git config core.filemode false \ No newline at end of file +# git config core.filemode false diff --git a/HISTORY.md b/HISTORY.md index d2bc925b..b84b61b7 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -13,8 +13,6 @@ Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready. -> Iris uses the [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) feature, so you get truly reproducible builds, as this method guards against upstream renames and deletes. - **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. # Soon diff --git a/README.md b/README.md index 6e168475..c35bd7a4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -[![build status](https://img.shields.io/travis/kataras/iris/master.svg?style=flat-square)](https://travis-ci.org/kataras/iris) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkataras%2Firis.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkataras%2Firis?ref=badge_shield) [![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=flat-square)](http://goreportcard.com/report/kataras/iris) [![chat](https://img.shields.io/badge/community-%20chat-00BCD4.svg?style=flat-square)](https://chat.iris-go.com) [![view examples](https://img.shields.io/badge/routing%20by-example-0077b3.svg?style=flat-square)](https://github.com/kataras/iris/tree/master/_examples/routing) [![release](https://img.shields.io/badge/release%20-v11.1-0077b3.svg?style=flat-square)](https://github.com/kataras/iris/releases) +[![build status](https://img.shields.io/travis/kataras/iris/master.svg?style=flat-square)](https://travis-ci.org/kataras/iris) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkataras%2Firis.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkataras%2Firis?ref=badge_shield) [![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=flat-square)](http://goreportcard.com/report/kataras/iris) [![chat](https://img.shields.io/badge/community-%20chat-00BCD4.svg?style=flat-square)](https://chat.iris-go.com) [![view examples](https://img.shields.io/badge/routing%20by-example-0077b3.svg?style=flat-square)](https://github.com/kataras/iris/tree/master/_examples/routing) [![release](https://img.shields.io/badge/release%20-v11.2-0077b3.svg?style=flat-square)](https://github.com/kataras/iris/releases) Iris is a fast, simple yet fully featured and very efficient web framework for Go. Routing is powered by the [muxie](https://github.com/kataras/muxie#philosophy) project. @@ -44,14 +44,12 @@ Iris does not force you to use any specific ORM or template engine. With support ## Installation -The only requirement is the [Go Programming Language](https://golang.org/dl/). +The only requirement is the [Go Programming Language](https://golang.org/dl/), version 1.12 and above. ```sh -$ go get -u github.com/kataras/iris +$ go get 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. The minimum required Go version to use Iris is go1.12. -
Known issues for code editors and IDEs at general diff --git a/README_GR.md b/README_GR.md index f7ce9d9f..0482d99b 100644 --- a/README_GR.md +++ b/README_GR.md @@ -87,14 +87,12 @@ _ ## Εγκατάσταση -Η μόνη απαίτηση είναι η [Go Γλώσσα Προγραμματισμού](https://golang.org/dl/) +Η μόνη απαίτηση είναι η [Go Γλώσσα Προγραμματισμού](https://golang.org/dl/), τουλάχιστον η έκδοση go.1.12. ```sh $ go get -u github.com/kataras/iris ``` -Το Iris εκμεταλλεύεται τη λεγόμενη λειτουργία [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo). Παίρνετε πλήρως αναπαραγωγίσιμα builds, καθώς αυτή η μέθοδος προστατεύει από τις upstream μετονομασίες και διαγραφές. - [![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png)](_benchmarks/README_UNIX.md) _Η τελευταία ενημέρωση έγινε την [Τρίτη, 21 Νοεμβρίου του 2017](_benchmarks/README_UNIX.md)_ diff --git a/README_ID.md b/README_ID.md index ceb49502..b4873d3f 100644 --- a/README_ID.md +++ b/README_ID.md @@ -91,8 +91,6 @@ Satu - satunya persyaratan adalah [Go Programming Language](https://golang.org/d $ go get -u github.com/kataras/iris ``` -Iris mengambil keuntungan dari fitur [vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo). Anda mendapatkan build yang benar - benar dapat direproduksi, karena metode ini menjaga terhadap penggantian nama dan penghapusan di upstream. - [![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png)](_benchmarks/README_UNIX.md) _Diperbarui pada: [Tuesday, 21 November 2017](_benchmarks/README_UNIX.md)_ diff --git a/README_JPN.md b/README_JPN.md index 8e063c77..13408bd3 100644 --- a/README_JPN.md +++ b/README_JPN.md @@ -91,8 +91,6 @@ _ $ go get -u github.com/kataras/iris ``` -Irisは[vendor directory](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo)機能の利点を活かしています。これが上流レポジトリの変更や削除を防ぐため、再現可能なビルドを実現します。 - [![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png)](_benchmarks/README_UNIX.md) _Updated at: [Tuesday, 21 November 2017](_benchmarks/README_UNIX.md)_ diff --git a/README_PT_BR.md b/README_PT_BR.md index a7387a3e..8b7c5833 100644 --- a/README_PT_BR.md +++ b/README_PT_BR.md @@ -91,8 +91,6 @@ O único pré requisito é a [Linguagem de Programação GO](https://golang.org/ $ go get -u github.com/kataras/iris ``` -Iris lança mão da [pasta vendor](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo). Dessa forma você conseguirá obter builds reprodutíveis já que esse método impede que nomes no branch upstream sejam renomeados ou deletados. - [![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png)](_benchmarks/README_UNIX.md) _Atualizado em : [Terça, 21 de Novembro de 2017](_benchmarks/README_UNIX.md)_ diff --git a/README_RU.md b/README_RU.md index cb90fecf..9c78972b 100644 --- a/README_RU.md +++ b/README_RU.md @@ -10,7 +10,9 @@ Iris предоставляет красиво выразительную и у Наконец, настоящий эквивалент expressjs для языка программирования Go. -Узнайте, что [другие говорят об Iris](#support), и [запустите](https://github.com/kataras/iris/stargazers) этот github-хранилище, чтобы оставаться в курсе последних событий [актуальными](https://facebook.com/iris.framework). +```go +go get -u github.com/kataras/iris +``` ## Сторонники diff --git a/README_ZH.md b/README_ZH.md index 6a0fcae8..d9ee9c37 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -87,8 +87,6 @@ _ $ go get -u github.com/kataras/iris ``` -Iris 使用 [vendor](https://docs.google.com/document/d/1Bz5-UB7g2uPBdOx-rw5t9MxJwkfpx90cqG9AFL0JAYo) 包依赖管理方式。vendor 包管理的方式可以有效处理包依赖更新问题 - [![Iris vs .NET Core(C#) vs Node.js (Express)](https://iris-go.com/images/benchmark-new-gray.png)](_benchmarks/README_UNIX.md) _更新于: [2017年11月21日星期二](_benchmarks/README_UNIX.md)_ diff --git a/_examples/README.md b/_examples/README.md index 72c7ef39..08d4c49a 100644 --- a/_examples/README.md +++ b/_examples/README.md @@ -314,7 +314,7 @@ Follow the examples below, - [Overview - Plus Repository and Service layers](mvc/overview) - [Login showcase - Plus Repository and Service layers](mvc/login) - [Singleton](mvc/singleton) -- [Websocket Controller](mvc/websocket) +- [Websocket Controller](mvc/websocket) **UPDATED** - [Register Middleware](mvc/middleware) - [Vue.js Todo MVC](tutorial/vuejs-todo-mvc) diff --git a/go.mod b/go.mod index 29041983..dab24ce0 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0 github.com/json-iterator/go v1.1.6 github.com/kataras/golog v0.0.0-20190624001437-99c81de45f40 - github.com/kataras/neffos v0.0.7 + github.com/kataras/neffos v0.0.8 github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d // indirect github.com/mediocregopher/radix/v3 v3.3.0 github.com/microcosm-cc/bluemonday v1.0.2 diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..2c94b16e --- /dev/null +++ b/go.sum @@ -0,0 +1,25 @@ +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/CloudyKit/jet v2.1.3-0.20180809161101-62edd43e4f88+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w= +github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM= +github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flosch/pongo2 v0.0.0-20190707114632-bbf5a6c351f4/go.mod h1:T9YF2M40nIgbVgp3rreNmTged+9HrbNTIQf1PsaIiTA= +github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= +github.com/iris-contrib/formBinder v0.0.0-20190104093907-fbd5963f41e1/go.mod h1:i8kTYUOEstd/S8TG0ChTXQdf4ermA/e8vJX0+QruD9w= +github.com/iris-contrib/go.uuid v2.0.0+incompatible h1:XZubAYg61/JwnJNbZilGjf3b3pB80+OQg2qf6c8BfWE= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= +github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/kataras/golog v0.0.0-20190624001437-99c81de45f40/go.mod h1:PcaEvfvhGsqwXZ6S3CgCbmjcp+4UDUh2MIfF2ZEul8M= +github.com/kataras/neffos v0.0.8 h1:mOv06sotaVbwCszRaRVerbDRP1embTR7y5J5dhnjjYs= +github.com/kataras/neffos v0.0.8/go.mod h1:ZYmJC07hQPW67eKuzlfY7SO3bC0mw83A3j6im82hfqw= +github.com/kataras/pio v0.0.0-20190103105442-ea782b38602d/go.mod h1:NV88laa9UiiDuX9AhMbDPkGYSPugBOV6yTZB1l2K9Z0= +github.com/mediocregopher/radix/v3 v3.3.0/go.mod h1:EmfVyvspXz1uZEyPBMyGK+kjWiKQGvsUt6O3Pj+LDCQ= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/iris.go b/iris.go index 092968e2..6cfb409b 100644 --- a/iris.go +++ b/iris.go @@ -859,8 +859,6 @@ func (app *Application) tryStartTunneling() { return } - hostIndex := 0 - app.ConfigureHost(func(su *host.Supervisor) { su.RegisterOnServe(func(h host.TaskHost) { tc := app.config.Tunneling @@ -868,10 +866,9 @@ func (app *Application) tryStartTunneling() { tc.WebInterface = "http://127.0.0.1:4040" } - if len(tc.Tunnels) > hostIndex { - t := tc.Tunnels[hostIndex] + for tunnIdx, t := range tc.Tunnels { if t.Name == "" { - t.Name = fmt.Sprintf("iris-app-%d-%s", hostIndex+1, time.Now().Format(app.config.TimeFormat)) + t.Name = fmt.Sprintf("iris-app-%d-%s", tunnIdx+1, time.Now().Format(app.config.TimeFormat)) } if t.Addr == "" { @@ -888,19 +885,9 @@ func (app *Application) tryStartTunneling() { // to make subdomains resolution still based on this new remote, public addresses. app.config.vhost = publicAddr[strings.Index(publicAddr, "://")+3:] - // app.logger.Debugf("Host: new virtual host is %s", app.config.vhost) - // app.Logger().Printer.Output.Write([]byte(")) - - // directLog := []byte(fmt.Sprintf("| Public Address: %s |\n", publicAddr)) - // box := bytes.Repeat([]byte("="), len(directLog)) - // directLog = append(append(box, []byte("\n")...), append(directLog, append(box, []byte("\n")...)...)...) directLog := []byte(fmt.Sprintf("⬝ Public Address: %s\n", publicAddr)) app.Logger().Printer.Output.Write(directLog) - } - - hostIndex++ }) }) - }