Update to version 12.1.4

Former-commit-id: aeb039ea25a831ad1087b1994be97b349a8ed4aa
This commit is contained in:
Gerasimos (Makis) Maropoulos 2019-12-29 19:14:41 +02:00
parent a30fe26095
commit 269b832ade
16 changed files with 30 additions and 20 deletions

View File

@ -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`.
# 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
Fix [[BUG] [iris.Default] RegisterView](https://github.com/kataras/iris/issues/1410)

View File

@ -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`.
# 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

View File

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

View File

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

View File

@ -4,5 +4,5 @@ go 1.13
require (
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
)

View File

@ -5,7 +5,7 @@ import (
)
// 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 build
// $ ./embedding-files-into-app

View File

@ -2,7 +2,7 @@ package main
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 build
// $ ./embedded-single-page-application-with-other-routes

View File

@ -4,7 +4,7 @@ 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 run .

View File

@ -13,7 +13,7 @@ func main() {
return "Greetings " + s + "!"
})
// $ go get -u github.com/shuLhan/go-bindata/...
// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./templates/...
// $ go build
// $ ./embedding-templates-into-app

View File

@ -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
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`
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
```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 build
$ ./template_jet_0_embedded

View File

@ -4,5 +4,5 @@ go 1.13
require (
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
)

View File

@ -95,7 +95,7 @@ func (f *embeddedFile) Stat() (os.FileInfo, error) {
}
// func (f *embeddedFile) Name() string {
// return strings.TrimLeft(f.vdir, f.FileInfo.Name())
// return strings.TrimPrefix(f.vdir, f.FileInfo.Name())
// }
type embeddedFileSystem struct {
@ -109,7 +109,7 @@ type embeddedFileSystem struct {
var _ http.FileSystem = (*embeddedFileSystem)(nil)
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 {
return d, nil
}
@ -221,7 +221,7 @@ func FileServer(directory string, opts ...DirOptions) context.Handler {
continue
}
names = append(names, strings.TrimLeft(name, vdir))
names = append(names, strings.TrimPrefix(name, vdir))
}
if len(names) == 0 {

2
doc.go
View File

@ -38,7 +38,7 @@ Source code and other details for the project are available at GitHub:
Current Version
12.1.3
12.1.4
Installation

View File

@ -39,7 +39,7 @@ import (
)
// 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.
// See: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml.

View File

@ -120,7 +120,13 @@ func (l *requestLoggerMiddleware) ServeHTTP(ctx context.Context) {
if headerMessage != nil {
line += fmt.Sprintf(" %v", headerMessage)
}
// if context.StatusCodeNotSuccessful(ctx.GetStatusCode()) {
// ctx.Application().Logger().Warn(line)
// } else {
ctx.Application().Logger().Info(line)
// }
}
// Columnize formats the given arguments as columns and returns the formatted output,

View File

@ -126,7 +126,7 @@ func hi(ctx iris.Context) {
## 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`,
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() {
app := iris.New()
// $ go get -u github.com/shuLhan/go-bindata/...
// $ go get -u github.com/go-bindata/go-bindata/...
// $ go-bindata ./templates/...
// $ go build
// $ ./embedding-templates-into-app