1. XenForo 1.5.14 中文版——支持中文搜索!现已发布!查看详情
  2. Xenforo 爱好者讨论群:215909318 XenForo专区

新闻 Go 语言极速 web 框架 IRIS V4.6.0 发布 下载

Discussion in '软件资讯' started by 漂亮的石头, 2016-10-15.

  1. 漂亮的石头

    漂亮的石头 版主 Staff Member

    Joined:
    2012-02-10
    Messages:
    487,979
    Likes Received:
    47
    Go 语言极速 web 框架 IRIS V4.1.1 发布了,更新如下:

    4.5.2/.3 -> 4.6.0

    This update affects only testers who used iris.Tester at the past.


    • FIX: httptest flags caused by httpexpect which used to help you with tests inside old funciris.Tester as reported here


    • NEW: iris.ResetDefault() func which resets the default iris instance which is the station for the most part of the public/package API


    • NEW: package httptest with configuration which can be passed per 'tester' instead of iris instance( this is very helpful for testers)


    • CHANGED: All tests are now converted for 'white-box' testing, means that tests now have package named: iris_test instead of iris in the same main directory.


    • CHANGED: iris.Tester moved to httptest.New which lives inside the new/kataras/iris/httptest package, so:

    import (
    "github.com/kataras/iris"
    "testing"
    )

    func MyTest(t *testing.T) {
    iris.Get("/mypath", func(ctx *iris.Context){
    ctx.Write("my body")
    })
    // with configs: iris.Config.Tester.ExplicitURL/Debug = true
    e:= iris.Tester(t)
    e.GET("/mypath").Expect().Status(iris.StatusOK).Body().Equal("my body")
    }

    used that instead/new

    import (
    "github.com/kataras/iris/httptest"
    "github.com/kataras/iris"
    "testing"
    )

    func MyTest(t *testing.T) {
    // make sure that you reset your default station if you don't use the form of app := iris.New()
    iris.ResetDefault()

    iris.Get("/mypath", func(ctx *iris.Context){
    ctx.Write("my body")
    })

    e:= httptest.New(iris.Default, t)
    // with configs: e:= httptest.New(iris.Default, t, httptest.ExplicitURL(true), httptest.Debug(true))
    e.GET("/mypath").Expect().Status(iris.StatusOK).Body().Equal("my body")
    }

    Finally, some plugins container's additions:


    • NEW: iris.Plugins.Len() func which returns the length of the current activated plugins in the default station


    • NEW: iris.Plugins.Fired("event") int func which returns how much times and from how many plugins a particular event type is fired, event types are: "prelookup", "prebuild", "prelisten", "postlisten", "preclose", "predownload"


    • NEW: iris.Plugins.PreLookupFired() bool func which returns true if PreLookup fired at least one time


    • NEW: iris.Plugins.PreBuildFired() bool func which returns true if PreBuild fired at least one time


    • NEW: iris.Plugins.PreListenFired() bool func which returns true ifPreListen/PreListenParallel fired at least one time


    • NEW: iris.Plugins.PostListenFired() bool func which returns true if PostListen fired at least one time


    • NEW: iris.Plugins.PreCloseFired() bool func which returns true if PreClose fired at least one time


    • NEW: iris.Plugins.PreDownloadFired() bool func which returns true if PreDownload fired at least one time

    Golang目前已经发展成为非常广泛使用的开发语言,如果你开发WEB、后台服务、API,都可以用到golang。

    原先我们用go来开发基于web的应用时,一般会用到net/http包,然后在代码中处理大量相同的事情,如:路由、鉴权等。

    现在通过Iris-Go,可以方便的帮助你来开发基于web的应用。

    [​IMG]

    Name
    Description​
    Usage​
    Basicauth Middleware
    HTTP Basic authentication​
    JWT Middleware
    JSON Web Tokens​
    Cors Middleware
    Cross Origin Resource Sharing W3 specification​
    Secure Middleware
    Facilitates some quick security wins​
    I18n Middleware
    Simple internationalization​
    Recovery Middleware
    Safety recover the station from panic​
    Logger Middleware
    Logs every request​
    Profile Middleware
    Http profiling for debugging​
    Editor Plugin
    Alm-tools, a typescript online IDE/Editor​
    Typescript Plugin
    Auto-compile client-side typescript files​
    OAuth,OAuth2 Plugin
    User Authentication was never be easier, supports >27 providers​
    Iris control Plugin
    Basic (browser-based) control over your Iris station​
    Name
    Description​
    Usage​
    JSON
    JSON Serializer (Default)​
    JSONP
    JSONP Serializer (Default)​
    XML
    XML Serializer (Default)​
    Markdown
    Markdown Serializer (Default)​
    Text
    Text Serializer (Default)​
    Binary Data
    Binary Data Serializer (Default)​
    Name
    Description​
    Usage​
    HTML/Default Engine
    HTML Template Engine (Default)​
    Django Engine
    Django Template Engine​
    Pug/Jade Engine
    Pug Template Engine​
    Handlebars Engine
    Handlebars Template Engine​
    Amber Engine
    Amber Template Engine​
    Markdown Engine
    Markdown Template Engine​
    Go 语言极速 web 框架 IRIS V4.6.0 发布下载地址
     
Loading...