mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
Update to version 12.1.4
Former-commit-id: aeb039ea25a831ad1087b1994be97b349a8ed4aa
This commit is contained in:
parent
a30fe26095
commit
269b832ade
|
@ -21,6 +21,10 @@ 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 github.com/kataras/iris/v12@latest`.
|
**How to upgrade**: Open your command-line and execute this command: `go get github.com/kataras/iris/v12@latest`.
|
||||||
|
|
||||||
|
# We, 29 December 2019 | v12.1.4
|
||||||
|
|
||||||
|
Minor fix on serving [embedded files](https://github.com/kataras/iris/wiki/File-server).
|
||||||
|
|
||||||
# We, 25 December 2019 | v12.1.3
|
# We, 25 December 2019 | v12.1.3
|
||||||
|
|
||||||
Fix [[BUG] [iris.Default] RegisterView](https://github.com/kataras/iris/issues/1410)
|
Fix [[BUG] [iris.Default] RegisterView](https://github.com/kataras/iris/issues/1410)
|
||||||
|
|
|
@ -21,9 +21,9 @@ Los desarrolladores no están obligados a actualizar si realmente no lo necesita
|
||||||
|
|
||||||
**Cómo actualizar**: Abra su línea de comandos y ejecute este comando: `go get github.com/kataras/iris/v12@latest`.
|
**Cómo actualizar**: Abra su línea de comandos y ejecute este comando: `go get github.com/kataras/iris/v12@latest`.
|
||||||
|
|
||||||
# We, 25 December 2019 | v12.1.3
|
# Su, 29 December 2019 | v12.1.4
|
||||||
|
|
||||||
Not translated yet, please navigate to the [english version](HISTORY.md#we-25-december-2019--v1213) instead.
|
Not translated yet, please navigate to the [english version](HISTORY.md#su-29-december-2019--v1214) instead.
|
||||||
|
|
||||||
# Sábado, 26 de octubre 2019 | v12.0.0
|
# Sábado, 26 de octubre 2019 | v12.0.0
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# ![](https://iris-go.com/images/santa.png) Merry Christmas everyone!
|
# ![](https://iris-go.com/images/santa.png) Happy Holidays Everyone!
|
||||||
|
|
||||||
![](https://iris-go.com/images/release.png) Iris version 12.1.3 has been [released](HISTORY.md#we-25-december-2019--v1213)!
|
![](https://iris-go.com/images/release.png) Iris version **12.1.4** has been [released](HISTORY.md#su-29-december-2019--v1214)!
|
||||||
|
|
||||||
![](https://iris-go.com/images/cli.png) The official Iris Command Line Interface will soon be near you in 2020!
|
![](https://iris-go.com/images/cli.png) The official Iris Command Line Interface will soon be near you in 2020!
|
||||||
|
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
12.1.3:https://github.com/kataras/iris/releases/tag/v12.1.3
|
12.1.4:https://github.com/kataras/iris/releases/tag/v12.1.4
|
|
@ -4,5 +4,5 @@ go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/betacraft/yaag v1.0.1-0.20191027021412-565f65e36090
|
github.com/betacraft/yaag v1.0.1-0.20191027021412-565f65e36090
|
||||||
github.com/kataras/iris/v12 v12.1.3
|
github.com/kataras/iris/v12 v12.1.4
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Follow these steps first:
|
// Follow these steps first:
|
||||||
// $ go get -u github.com/shuLhan/go-bindata/...
|
// $ go get -u github.com/go-bindata/go-bindata/...
|
||||||
// $ go-bindata ./assets/...
|
// $ go-bindata ./assets/...
|
||||||
// $ go build
|
// $ go build
|
||||||
// $ ./embedding-files-into-app
|
// $ ./embedding-files-into-app
|
||||||
|
|
|
@ -2,7 +2,7 @@ package main
|
||||||
|
|
||||||
import "github.com/kataras/iris/v12"
|
import "github.com/kataras/iris/v12"
|
||||||
|
|
||||||
// $ go get -u github.com/shuLhan/go-bindata/...
|
// $ go get -u github.com/go-bindata/go-bindata/...
|
||||||
// $ go-bindata ./public/...
|
// $ go-bindata ./public/...
|
||||||
// $ go build
|
// $ go build
|
||||||
// $ ./embedded-single-page-application-with-other-routes
|
// $ ./embedded-single-page-application-with-other-routes
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"github.com/kataras/iris/v12"
|
"github.com/kataras/iris/v12"
|
||||||
)
|
)
|
||||||
|
|
||||||
// $ go get -u github.com/shuLhan/go-bindata/...
|
// $ go get -u github.com/go-bindata/go-bindata/...
|
||||||
// $ go-bindata ./public/...
|
// $ go-bindata ./public/...
|
||||||
// $ go run .
|
// $ go run .
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ func main() {
|
||||||
return "Greetings " + s + "!"
|
return "Greetings " + s + "!"
|
||||||
})
|
})
|
||||||
|
|
||||||
// $ go get -u github.com/shuLhan/go-bindata/...
|
// $ go get -u github.com/go-bindata/go-bindata/...
|
||||||
// $ go-bindata ./templates/...
|
// $ go-bindata ./templates/...
|
||||||
// $ go build
|
// $ go build
|
||||||
// $ ./embedding-templates-into-app
|
// $ ./embedding-templates-into-app
|
||||||
|
|
|
@ -6,7 +6,7 @@ This example teaches you how to use jet templates embedded in your applications
|
||||||
|
|
||||||
This example is a customized fork of https://github.com/CloudyKit/jet/tree/master/examples/asset_packaging, so you can
|
This example is a customized fork of https://github.com/CloudyKit/jet/tree/master/examples/asset_packaging, so you can
|
||||||
notice the differences side by side. For example, you don't have to use any external package inside your application,
|
notice the differences side by side. For example, you don't have to use any external package inside your application,
|
||||||
Iris manually builds the template loader for binary data when Asset and AssetNames are available through tools like the [go-bindata](github.com/shuLhan/go-bindata).
|
Iris manually builds the template loader for binary data when Asset and AssetNames are available through tools like the [go-bindata](github.com/go-bindata/go-bindata).
|
||||||
|
|
||||||
Note that you can still use any custom loaders through the `JetEngine.SetLoader`
|
Note that you can still use any custom loaders through the `JetEngine.SetLoader`
|
||||||
which overrides any previous loaders like `JetEngine.Binary` we use on this example.
|
which overrides any previous loaders like `JetEngine.Binary` we use on this example.
|
||||||
|
@ -14,7 +14,7 @@ which overrides any previous loaders like `JetEngine.Binary` we use on this exam
|
||||||
## How to run
|
## How to run
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ go get -u github.com/shuLhan/go-bindata/... # or any active alternative
|
$ go get -u github.com/go-bindata/go-bindata/...
|
||||||
$ go-bindata ./views/...
|
$ go-bindata ./views/...
|
||||||
$ go build
|
$ go build
|
||||||
$ ./template_jet_0_embedded
|
$ ./template_jet_0_embedded
|
||||||
|
|
|
@ -4,5 +4,5 @@ go 1.13
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/googollee/go-socket.io v1.4.3-0.20191109153049-7451e2f8c2e0 // indirect
|
github.com/googollee/go-socket.io v1.4.3-0.20191109153049-7451e2f8c2e0 // indirect
|
||||||
github.com/kataras/iris/v12 v12.1.3
|
github.com/kataras/iris/v12 v12.1.4
|
||||||
)
|
)
|
||||||
|
|
|
@ -95,7 +95,7 @@ func (f *embeddedFile) Stat() (os.FileInfo, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// func (f *embeddedFile) Name() string {
|
// func (f *embeddedFile) Name() string {
|
||||||
// return strings.TrimLeft(f.vdir, f.FileInfo.Name())
|
// return strings.TrimPrefix(f.vdir, f.FileInfo.Name())
|
||||||
// }
|
// }
|
||||||
|
|
||||||
type embeddedFileSystem struct {
|
type embeddedFileSystem struct {
|
||||||
|
@ -109,7 +109,7 @@ type embeddedFileSystem struct {
|
||||||
var _ http.FileSystem = (*embeddedFileSystem)(nil)
|
var _ http.FileSystem = (*embeddedFileSystem)(nil)
|
||||||
|
|
||||||
func (fs *embeddedFileSystem) Open(name string) (http.File, error) {
|
func (fs *embeddedFileSystem) Open(name string) (http.File, error) {
|
||||||
// name = fs.vdir + name <- no need, check the TrimLeft(name, vdir) on names loop and the asset and assetInfo redefined on `HandleDir`.
|
// name = fs.vdir + name <- no need, check the TrimPrefix(name, vdir) on names loop and the asset and assetInfo redefined on `HandleDir`.
|
||||||
if d, ok := fs.dirNames[name]; ok {
|
if d, ok := fs.dirNames[name]; ok {
|
||||||
return d, nil
|
return d, nil
|
||||||
}
|
}
|
||||||
|
@ -221,7 +221,7 @@ func FileServer(directory string, opts ...DirOptions) context.Handler {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
names = append(names, strings.TrimLeft(name, vdir))
|
names = append(names, strings.TrimPrefix(name, vdir))
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(names) == 0 {
|
if len(names) == 0 {
|
||||||
|
|
2
doc.go
2
doc.go
|
@ -38,7 +38,7 @@ Source code and other details for the project are available at GitHub:
|
||||||
|
|
||||||
Current Version
|
Current Version
|
||||||
|
|
||||||
12.1.3
|
12.1.4
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
|
||||||
|
|
2
iris.go
2
iris.go
|
@ -39,7 +39,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Version is the current version number of the Iris Web Framework.
|
// Version is the current version number of the Iris Web Framework.
|
||||||
const Version = "12.1.3"
|
const Version = "12.1.4"
|
||||||
|
|
||||||
// HTTP status codes as registered with IANA.
|
// HTTP status codes as registered with IANA.
|
||||||
// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.
|
// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.
|
||||||
|
|
|
@ -120,7 +120,13 @@ func (l *requestLoggerMiddleware) ServeHTTP(ctx context.Context) {
|
||||||
if headerMessage != nil {
|
if headerMessage != nil {
|
||||||
line += fmt.Sprintf(" %v", headerMessage)
|
line += fmt.Sprintf(" %v", headerMessage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if context.StatusCodeNotSuccessful(ctx.GetStatusCode()) {
|
||||||
|
// ctx.Application().Logger().Warn(line)
|
||||||
|
// } else {
|
||||||
ctx.Application().Logger().Info(line)
|
ctx.Application().Logger().Info(line)
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Columnize formats the given arguments as columns and returns the formatted output,
|
// Columnize formats the given arguments as columns and returns the formatted output,
|
||||||
|
|
|
@ -126,7 +126,7 @@ func hi(ctx iris.Context) {
|
||||||
|
|
||||||
## Embedded
|
## Embedded
|
||||||
|
|
||||||
View engine supports bundled(https://github.com/shuLhan/go-bindata) template files too.
|
View engine supports bundled(https://github.com/go-bindata/go-bindata) template files too.
|
||||||
`go-bindata` gives you two functions, `Assset` and `AssetNames`,
|
`go-bindata` gives you two functions, `Assset` and `AssetNames`,
|
||||||
these can be set to each of the template engines using the `.Binary` function.
|
these can be set to each of the template engines using the `.Binary` function.
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ import "github.com/kataras/iris/v12"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app := iris.New()
|
app := iris.New()
|
||||||
// $ go get -u github.com/shuLhan/go-bindata/...
|
// $ go get -u github.com/go-bindata/go-bindata/...
|
||||||
// $ go-bindata ./templates/...
|
// $ go-bindata ./templates/...
|
||||||
// $ go build
|
// $ go build
|
||||||
// $ ./embedding-templates-into-app
|
// $ ./embedding-templates-into-app
|
||||||
|
|
Loading…
Reference in New Issue
Block a user