diff --git a/etc/dotsfile/.vimrc b/etc/dotsfile/.vimrc index e69eca7d..6bbd28ef 100644 --- a/etc/dotsfile/.vimrc +++ b/etc/dotsfile/.vimrc @@ -48,9 +48,12 @@ Plug 'vim-syntastic/syntastic' let g:syntastic_quiet_messages = { "regex": [ \ "Missing module docstring", \ "Missing class docstring", + \ "Missing method docstring", \ "Missing function docstring", \ "Wrong continued indentation", \ "Line Too Long", + \ "Invalid variable name", + \ "Too many instance attributes", \ "defined outside __init__", \ ] } diff --git a/src/contexts/web/web.go b/src/contexts/web/web.go index 8f570ea3..d1d952af 100644 --- a/src/contexts/web/web.go +++ b/src/contexts/web/web.go @@ -393,19 +393,6 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心", "from": "root", "to": []interface{}{}, "template": "userinfo", "title": "userinfo", }, - //聊天服务 - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "aaa", "detail": []interface{}{"lark"}, - "template": "detail", "title": "list_lark", - // "option": map[string]interface{}{"auto_refresh": true}, - }, - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "aaa", "detail": []interface{}{"lark"}, - "template": "detail", "title": "send_lark", - "option": map[string]interface{}{"ninput": 2}, - }, //文件服务 map[string]interface{}{ "from": "root", "to": []interface{}{}, @@ -421,43 +408,13 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心", "from": "root", "to": []interface{}{}, "template": "create", "title": "create", }, - //格式转换 - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "cli", "detail": []interface{}{"time"}, - "template": "detail", "title": "time", - "option": map[string]interface{}{"refresh": true, "ninput": 1}, - }, - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "nfs", "detail": []interface{}{"pwd"}, - "template": "detail", "title": "pwd", - "option": map[string]interface{}{"refresh": true}, - }, - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "nfs", "detail": []interface{}{"json"}, - "template": "detail", "title": "json", - "option": map[string]interface{}{"ninput": 1}, - }, - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "cli", "detail": []interface{}{"system", "tmux", "show-buffer"}, - "template": "detail", "title": "buffer", - "option": map[string]interface{}{"ninput": 1}, - }, + //会话服务 map[string]interface{}{ "from": "root", "to": []interface{}{}, "module": "cli", "command": "system", "argument": []interface{}{"tmux", "show-buffer"}, "template": "result", "title": "buffer", }, - map[string]interface{}{ - "from": "root", "to": []interface{}{}, - "module": "web", "command": "/share", - "argument": []interface{}{}, - "template": "share", "title": "share", - }, map[string]interface{}{ "from": "root", "to": []interface{}{}, "module": "cli", "command": "system", @@ -470,12 +427,37 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心", "argument": []interface{}{"tmux", "list-sessions"}, "template": "result", "title": "session", }, + //格式转换 + map[string]interface{}{ + "from": "root", "to": []interface{}{}, + "module": "cli", "detail": []interface{}{"time"}, + "template": "detail", "title": "time", + "option": map[string]interface{}{"refresh": true, "ninput": 1}, + }, + map[string]interface{}{ + "from": "root", "to": []interface{}{}, + "module": "nfs", "detail": []interface{}{"json"}, + "template": "detail", "title": "json", + "option": map[string]interface{}{"ninput": 1}, + }, + map[string]interface{}{ + "from": "root", "to": []interface{}{}, + "module": "nfs", "detail": []interface{}{"pwd"}, + "template": "detail", "title": "pwd", + "option": map[string]interface{}{"refresh": true}, + }, map[string]interface{}{ "from": "root", "to": []interface{}{}, "module": "nfs", "command": "git", "argument": []interface{}{}, "template": "result", "title": "git", }, + map[string]interface{}{ + "from": "root", "to": []interface{}{}, + "module": "web", "command": "/share", + "argument": []interface{}{}, + "template": "share", "title": "share", + }, }, "notice": []interface{}{ map[string]interface{}{ @@ -1207,7 +1189,7 @@ var Index = &ctx.Context{Name: "web", Help: "应用中心", if m.Options("sessid") { if aaa := m.Sess("aaa").Cmd("login", m.Option("sessid")); aaa.Results(0) { m.Append("redirect", m.Option("referer")) - m.Append("username", aaa.Cap("username")) + m.Append("username", aaa.Result(0)) return } } diff --git a/src/example/bench.go b/src/example/bench.go index 9f986cf1..05c7c529 100644 --- a/src/example/bench.go +++ b/src/example/bench.go @@ -1,21 +1,21 @@ package main import ( + "os" + "contexts" _ "contexts/aaa" _ "contexts/cli" - _ "contexts/ssh" - - _ "contexts/mdb" - _ "contexts/nfs" - _ "contexts/tcp" _ "contexts/web" _ "contexts/lex" _ "contexts/log" _ "contexts/yac" - "os" + _ "contexts/mdb" + _ "contexts/nfs" + _ "contexts/ssh" + _ "contexts/tcp" ) func main() {