Former-commit-id: f0a26383ace695525d5aec52ec2181d781d26a83
This commit is contained in:
Gerasimos (Makis) Maropoulos 2019-07-19 12:27:35 +03:00
parent 4c4b2f5d00
commit 452b7d2df0
13 changed files with 37 additions and 38 deletions

1
.gitattributes vendored
View File

@ -1,5 +1,4 @@
*.go linguist-language=Go *.go linguist-language=Go
vendor/* linguist-vendored
_examples/* linguist-documentation _examples/* linguist-documentation
_benchmarks/* linguist-documentation _benchmarks/* linguist-documentation
# Set the default behavior, in case people don't have core.autocrlf set. # Set the default behavior, in case people don't have core.autocrlf set.

View File

@ -13,8 +13,6 @@
Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready. 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. **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 # Soon

View File

@ -2,7 +2,7 @@
<a href="https://iris-go.com"> <img align="right" width="169px" src="https://iris-go.com/images/icon.svg?v=a" title="logo created by @merry.dii" /> </a> <a href="https://iris-go.com"> <img align="right" width="169px" src="https://iris-go.com/images/icon.svg?v=a" title="logo created by @merry.dii" /> </a>
[![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) <!-- [![release](https://img.shields.io/github/release/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/releases)--> [![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=flat-square)](http://goreportcard.com/report/kataras/iris) <!-- [![vscode-iris](https://img.shields.io/badge/ext%20-vscode-0c77e3.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=kataras2006.iris)--> <!--[![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)--> [![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) <!-- [![release](https://img.shields.io/github/release/kataras/iris.svg?style=flat-square)](https://github.com/kataras/iris/releases)--> [![report card](https://img.shields.io/badge/report%20card-a%2B-ff3333.svg?style=flat-square)](http://goreportcard.com/report/kataras/iris) <!-- [![vscode-iris](https://img.shields.io/badge/ext%20-vscode-0c77e3.svg?style=flat-square)](https://marketplace.visualstudio.com/items?itemName=kataras2006.iris)--> <!--[![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)--> [![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. 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 ## 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 ```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.
<details> <details>
<summary>Known issues for code editors and IDEs at general</summary> <summary>Known issues for code editors and IDEs at general</summary>

View File

@ -87,14 +87,12 @@ _
## Εγκατάσταση ## Εγκατάσταση
Η μόνη απαίτηση είναι η [Go Γλώσσα Προγραμματισμού](https://golang.org/dl/) Η μόνη απαίτηση είναι η [Go Γλώσσα Προγραμματισμού](https://golang.org/dl/), τουλάχιστον η έκδοση go.1.12.
```sh ```sh
$ go get -u github.com/kataras/iris $ 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) [![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)_ _Η τελευταία ενημέρωση έγινε την [Τρίτη, 21 Νοεμβρίου του 2017](_benchmarks/README_UNIX.md)_

View File

@ -91,8 +91,6 @@ Satu - satunya persyaratan adalah [Go Programming Language](https://golang.org/d
$ go get -u github.com/kataras/iris $ 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) [![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)_ _Diperbarui pada: [Tuesday, 21 November 2017](_benchmarks/README_UNIX.md)_

View File

@ -91,8 +91,6 @@ _
$ go get -u github.com/kataras/iris $ 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) [![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)_ _Updated at: [Tuesday, 21 November 2017](_benchmarks/README_UNIX.md)_

View File

@ -91,8 +91,6 @@ O único pré requisito é a [Linguagem de Programação GO](https://golang.org/
$ go get -u github.com/kataras/iris $ 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) [![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)_ _Atualizado em : [Terça, 21 de Novembro de 2017](_benchmarks/README_UNIX.md)_

View File

@ -10,7 +10,9 @@ Iris предоставляет красиво выразительную и у
Наконец, настоящий эквивалент expressjs для языка программирования Go. Наконец, настоящий эквивалент expressjs для языка программирования Go.
Узнайте, что [другие говорят об Iris](#support), и [запустите](https://github.com/kataras/iris/stargazers) этот github-хранилище, чтобы оставаться в курсе последних событий [актуальными](https://facebook.com/iris.framework). ```go
go get -u github.com/kataras/iris
```
## Сторонники ## Сторонники

View File

@ -87,8 +87,6 @@ _
$ go get -u github.com/kataras/iris $ 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) [![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)_ _更新于: [2017年11月21日星期二](_benchmarks/README_UNIX.md)_

View File

@ -314,7 +314,7 @@ Follow the examples below,
- [Overview - Plus Repository and Service layers](mvc/overview) - [Overview - Plus Repository and Service layers](mvc/overview)
- [Login showcase - Plus Repository and Service layers](mvc/login) - [Login showcase - Plus Repository and Service layers](mvc/login)
- [Singleton](mvc/singleton) - [Singleton](mvc/singleton)
- [Websocket Controller](mvc/websocket) - [Websocket Controller](mvc/websocket) **UPDATED**
- [Register Middleware](mvc/middleware) - [Register Middleware](mvc/middleware)
- [Vue.js Todo MVC](tutorial/vuejs-todo-mvc) - [Vue.js Todo MVC](tutorial/vuejs-todo-mvc)

2
go.mod
View File

@ -21,7 +21,7 @@ require (
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0 github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0
github.com/json-iterator/go v1.1.6 github.com/json-iterator/go v1.1.6
github.com/kataras/golog v0.0.0-20190624001437-99c81de45f40 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/kataras/pio v0.0.0-20190103105442-ea782b38602d // indirect
github.com/mediocregopher/radix/v3 v3.3.0 github.com/mediocregopher/radix/v3 v3.3.0
github.com/microcosm-cc/bluemonday v1.0.2 github.com/microcosm-cc/bluemonday v1.0.2

25
go.sum Normal file
View File

@ -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=

17
iris.go
View File

@ -859,8 +859,6 @@ func (app *Application) tryStartTunneling() {
return return
} }
hostIndex := 0
app.ConfigureHost(func(su *host.Supervisor) { app.ConfigureHost(func(su *host.Supervisor) {
su.RegisterOnServe(func(h host.TaskHost) { su.RegisterOnServe(func(h host.TaskHost) {
tc := app.config.Tunneling tc := app.config.Tunneling
@ -868,10 +866,9 @@ func (app *Application) tryStartTunneling() {
tc.WebInterface = "http://127.0.0.1:4040" tc.WebInterface = "http://127.0.0.1:4040"
} }
if len(tc.Tunnels) > hostIndex { for tunnIdx, t := range tc.Tunnels {
t := tc.Tunnels[hostIndex]
if t.Name == "" { 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 == "" { if t.Addr == "" {
@ -888,19 +885,9 @@ func (app *Application) tryStartTunneling() {
// to make subdomains resolution still based on this new remote, public addresses. // to make subdomains resolution still based on this new remote, public addresses.
app.config.vhost = publicAddr[strings.Index(publicAddr, "://")+3:] 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)) directLog := []byte(fmt.Sprintf("⬝ Public Address: %s\n", publicAddr))
app.Logger().Printer.Output.Write(directLog) app.Logger().Printer.Output.Write(directLog)
} }
hostIndex++
}) })
}) })
} }