This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <el-menu :router="true" :default-active="activeLink"> | |
| <template v-for="rule in $router.options.routes"> | |
| <el-submenu v-if="rule.children && rule.children.length > 0" | |
| :index="rule.path" | |
| > | |
| <template slot="title"><i :class="rule.icon"></i>{{ rule.title }}</template> | |
| <el-menu-item v-for="child in rule.children" :index="rule.path + '/' + child.path">{{ child.title }}</el-menu-item> | |
| </el-submenu> | |
| <el-menu-item v-else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "database/sql" | |
| "encoding/json" | |
| "fmt" | |
| "reflect" | |
| "time" | |
| "github.com/go-sql-driver/mysql" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| master=> SELECT * FROM (VALUES (1, true), (2, false), (3, null)) AS t (id,value); | |
| id | value | |
| ----+------- | |
| 1 | t | |
| 2 | f | |
| 3 | | |
| (3 rows) | |
| master=> SELECT * FROM (VALUES (1, true), (2, false), (3, null)) AS t (id,value) order by value; | |
| id | value |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func TestFasthttpServer(t *testing.T) { | |
| fSv := fasthttp.Server{} | |
| fSv.Handler = func(ctx *fasthttp.RequestCtx) { | |
| if string(ctx.Path()) == "/test" && string(ctx.Method()) == "GET" { | |
| ctx.WriteString("OK") | |
| } | |
| } | |
| ln := fasthttputil.NewInmemoryListener() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/valyala/fasthttp/issues/36 | |
| // | |
| // serve serves http request using provided fasthttp handler | |
| func serve(handler fasthttp.RequestHandler, req *http.Request) (*http.Response, error) { | |
| ln := fasthttputil.NewInmemoryListener() | |
| defer ln.Close() | |
| go func() { | |
| err := fasthttp.Serve(ln, handler) | |
| if err != nil { |