diff --git a/HISTORY.md b/HISTORY.md index 5a794e74..5314fc78 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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) diff --git a/HISTORY_ES.md b/HISTORY_ES.md index a68d4e25..8aa7f615 100644 --- a/HISTORY_ES.md +++ b/HISTORY_ES.md @@ -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 diff --git a/README.md b/README.md index 919b74c6..dfcd108b 100644 --- a/README.md +++ b/README.md @@ -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! diff --git a/VERSION b/VERSION index 4ab4f01a..a26d80ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.1.3:https://github.com/kataras/iris/releases/tag/v12.1.3 \ No newline at end of file +12.1.4:https://github.com/kataras/iris/releases/tag/v12.1.4 \ No newline at end of file diff --git a/_examples/apidoc/yaag/go.mod b/_examples/apidoc/yaag/go.mod index 7bd6fae2..64abff8d 100644 --- a/_examples/apidoc/yaag/go.mod +++ b/_examples/apidoc/yaag/go.mod @@ -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 ) diff --git a/_examples/file-server/embedding-files-into-app/main.go b/_examples/file-server/embedding-files-into-app/main.go index 1f8a8db8..143dcc69 100644 --- a/_examples/file-server/embedding-files-into-app/main.go +++ b/_examples/file-server/embedding-files-into-app/main.go @@ -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 diff --git a/_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/main.go b/_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/main.go index 729b4b32..61070633 100644 --- a/_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/main.go +++ b/_examples/file-server/single-page-application/embedded-single-page-application-with-other-routes/main.go @@ -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 diff --git a/_examples/file-server/single-page-application/embedded-single-page-application/main.go b/_examples/file-server/single-page-application/embedded-single-page-application/main.go index 269338f6..a1d8e608 100644 --- a/_examples/file-server/single-page-application/embedded-single-page-application/main.go +++ b/_examples/file-server/single-page-application/embedded-single-page-application/main.go @@ -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 . diff --git a/_examples/view/embedding-templates-into-app/main.go b/_examples/view/embedding-templates-into-app/main.go index 7d3ee771..fb80ca00 100644 --- a/_examples/view/embedding-templates-into-app/main.go +++ b/_examples/view/embedding-templates-into-app/main.go @@ -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 diff --git a/_examples/view/template_jet_1_embedded/README.md b/_examples/view/template_jet_1_embedded/README.md index a6315743..c44e31a7 100644 --- a/_examples/view/template_jet_1_embedded/README.md +++ b/_examples/view/template_jet_1_embedded/README.md @@ -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 diff --git a/_examples/websocket/socketio/go.mod b/_examples/websocket/socketio/go.mod index b4529e1b..fa9ec1b9 100644 --- a/_examples/websocket/socketio/go.mod +++ b/_examples/websocket/socketio/go.mod @@ -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 ) diff --git a/core/router/fs.go b/core/router/fs.go index 3e197b5b..a695ad33 100644 --- a/core/router/fs.go +++ b/core/router/fs.go @@ -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 { diff --git a/doc.go b/doc.go index 0a230253..14211da0 100644 --- a/doc.go +++ b/doc.go @@ -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 diff --git a/iris.go b/iris.go index 13f14567..f0e67b6d 100644 --- a/iris.go +++ b/iris.go @@ -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. diff --git a/middleware/logger/logger.go b/middleware/logger/logger.go index e7395856..bca0b6a6 100644 --- a/middleware/logger/logger.go +++ b/middleware/logger/logger.go @@ -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, diff --git a/view/README.md b/view/README.md index 1f83075d..4f53ac3d 100644 --- a/view/README.md +++ b/view/README.md @@ -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