Skip to content

Latest commit

 

History

History
255 lines (164 loc) · 12.1 KB

HISTORY.md

File metadata and controls

255 lines (164 loc) · 12.1 KB

Changelog

Looking for free and real-time support?

https://github.com/kataras/iris/issues
https://chat.iris-go.com

Looking for previous versions?

https://github.com/kataras/iris/releases

Want to be hired?

https://facebook.com/iris.framework

Should I upgrade my Iris?

Developers are not forced to upgrade if they don't really need it. Upgrade whenever you feel ready.

How to upgrade: Open your command-line and execute this command: go get github.com/kataras/iris/v12@latest.

Su, 16 February 2020 | v12.1.8

New Features:

Fixes:

New Examples:

Mo, 10 February 2020 | v12.1.7

Implement new SetRegisterRule(iris.RouteOverride, RouteSkip, RouteError) to resolve: kataras#1448

New Examples:

We, 05 February 2020 | v12.1.6

Fixes:

Su, 02 February 2020 | v12.1.5

Various improvements and linting.

Su, 29 December 2019 | v12.1.4

Minor fix on serving embedded files.

We, 25 December 2019 | v12.1.3

Fix [BUG] [iris.Default] RegisterView

Th, 19 December 2019 | v12.1.2

Fix [BUG]Session works incorrectly when meets the multi-level TLDs.

Mo, 16 December 2019 | v12.1.1

Add Context.FindClosest(n int) []string

app := iris.New()
app.OnErrorCode(iris.StatusNotFound, notFound)
func notFound(ctx iris.Context) {
    suggestPaths := ctx.FindClosest(3)
    if len(suggestPaths) == 0 {
        ctx.WriteString("404 not found")
        return
    }

    ctx.HTML("Did you mean?<ul>")
    for _, s := range suggestPaths {
        ctx.HTML(`<li><a href="%s">%s</a></li>`, s, s)
    }
    ctx.HTML("</ul>")
}

Fr, 13 December 2019 | v12.1.0

Breaking Changes

Minor as many of you don't even use them but, indeed, they need to be covered here.

  • Old i18n middleware(iris/middleware/i18n) was replaced by the i18n sub-package which lives as field at your application: app.I18n.Load(globPathPattern string, languages ...string) (see below)
  • Community-driven i18n middleware(iris-contrib/middleware/go-i18n) has a NewLoader function which returns a loader which can be passed at app.I18n.Reset(loader i18n.Loader, languages ...string) to change the locales parser
  • The Configuration's TranslateFunctionContextKey was replaced by LocaleContextKey which Context store's value (if i18n is used) returns the current Locale which contains the translate function, the language code, the language tag and the index position of it
  • The context.Translate method was replaced by context.Tr as a shortcut for the new context.GetLocale().GetMessage(format, args...) method and it matches the view's function {{tr format args}} too
  • If you used Iris Django view engine with import _ github.com/flosch/pongo2-addons you must change the import path to _ github.com/iris-contrib/pongo2-addons or add a go mod replace to your go.mod file, e.g. replace github.com/flosch/pongo2-addons => github.com/iris-contrib/pongo2-addons v0.0.1.

Fixes

All known issues.

  1. #1395
  2. #1369
  3. #1399 with PR #1400
  4. #1401
  5. #1406
  6. neffos/#20
  7. pio/#5

New Features

Internationalization and localization

Support for i18n is now a builtin feature and is being respected across your entire application, per say sitemap and views.

Refer to the wiki section: https://github.com/kataras/iris/wiki/Sitemap for details.

Sitemaps

Iris generates and serves one or more sitemap.xml for your static routes.

Navigate through: https://github.com/kataras/iris/wiki/Sitemap for more.

New Examples

  1. _examples/i18n
  2. _examples/sitemap
  3. _examples/desktop-app/blink
  4. _examples/desktop-app/lorca
  5. _examples/desktop-app/webview

Sa, 26 October 2019 | v12.0.0

  • Add version suffix of the import path, learn why and see what people voted at issue #1370

  • All errors are now compatible with go1.13 errors.Is, errors.As and fmt.Errorf and a new core/errgroup package created
  • Fix #1383
  • Report whether system couldn't find the directory of view templates
  • Remove the Party#GetReport method, keep Party#GetReporter which is an error and an errgroup.Group.
  • Remove the router's deprecated methods such as StaticWeb and StaticEmbedded_XXX
  • The Context#CheckIfModifiedSince now returns an context.ErrPreconditionFailed type of error when client conditions are not met. Usage: if errors.Is(err, context.ErrPreconditionFailed) { ... }
  • Add SourceFileName and SourceLineNumber to the Route, reports the exact position of its registration inside your project's source code.
  • Fix a bug about the MVC package route binding, see PR #1364
  • Add mvc/Application#SortByNumMethods as requested at #1343
  • Add status code 103 Early Hints
  • Fix performance of session.UpdateExpiration on 200 thousands+ keys with new radix as reported at issue #1328
  • New redis session database configuration field: Driver: redis.Redigo() or redis.Radix(), see updated examples
  • Add Clusters support for redis:radix session database (Driver: redis:Radix()) as requested at issue #1339
  • Create Iranian README_FA translation with PR #1360
  • Create Korean README_KO translation with PR #1356
  • Create Spanish README_ES and HISTORY_ES translations with PR #1344.

The iris-contrib/middleare and examples are updated to use the new github.com/kataras/iris/v12 import path.

Fr, 16 August 2019 | v11.2.8

  • Set Cookie.SameSite to Lax when subdomains sessions share is enabled*
  • Add and update all experimental handlers
  • New XMLMap function which wraps a map[string]interface{} and converts it to a valid xml content to render through Context.XML method
  • Add new ProblemOptions.XML and RenderXML fields to render the Problem as XML(application/problem+xml) instead of JSON("application/problem+json) and enrich the Negotiate to easily accept the application/problem+xml mime.

Commit log: https://github.com/kataras/iris/compare/v11.2.7...v11.2.8

Th, 15 August 2019 | v11.2.7

This minor version contains improvements on the Problem Details for HTTP APIs implemented on v11.2.5.

Example and wikis updated.

References:

Commit log: https://github.com/kataras/iris/compare/v11.2.6...v11.2.7

We, 14 August 2019 | v11.2.6

Allow handle more than one route with the same paths and parameter types but different macro validation functions.

app.Get("/{alias:string regexp(^[a-z0-9]{1,10}\\.xml$)}", PanoXML)
app.Get("/{alias:string regexp(^[a-z0-9]{1,10}$)}", Tour)

Commit log: https://github.com/kataras/iris/compare/v11.2.5...v11.2.6

Mo, 12 August 2019 | v11.2.5

Commit log: https://github.com/kataras/iris/compare/v11.2.4...v11.2.5

Fr, 09 August 2019 | v11.2.4

Commit log: https://github.com/kataras/iris/compare/v11.2.3...v11.2.4

Tu, 30 July 2019 | v11.2.3

We, 24 July 2019 | v11.2.2

Sessions as middleware:

import "github.com/kataras/iris/v12/sessions"
// [...]

app := iris.New()
sess := sessions.New(sessions.Config{...})

app.Get("/path", func(ctx iris.Context){
    session := sessions.Get(ctx)
    // [work with session...]
})
  • Add Session.Len() int to return the total number of stored values/entries.
  • Make Context.HTML and Context.Text to accept an optional, variadic, args ...interface{} input arg(s) too.

v11.1.1

Tu, 23 July 2019 | v11.2.0

Read about the new release at: https://www.facebook.com/iris.framework/posts/3276606095684693