From 239cab91efaa7a507e9e17ede2471b213c965fe2 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Wed, 13 Jul 2022 08:20:26 +0800 Subject: [PATCH] opt some --- etc/init.shy | 7 ++----- src/h2/h2.go | 17 +++++++++++++++++ src/h2/h2.js | 4 ++++ src/h2/h2.shy | 3 +++ src/main.go | 4 +++- src/main.shy | 2 ++ 6 files changed, 31 insertions(+), 6 deletions(-) create mode 100644 src/h2/h2.go create mode 100644 src/h2/h2.js create mode 100644 src/h2/h2.shy diff --git a/etc/init.shy b/etc/init.shy index df3b7d1d..c11c355f 100644 --- a/etc/init.shy +++ b/etc/init.shy @@ -8,12 +8,9 @@ role white void web.wiki.draw ~web.code - # config inner meta.show.plug "web.chat.website,web.dream" - config inner meta.show.plug "cli.system,web.dream" - # config inner meta.show.exts "inner/search.js?a=1,inner/favor.js,inner/template.js" - config inner meta.show.exts "inner/search.js?a=1,inner/favor.js" - config inner meta.show.tabs "src/:main.go:1,src/:main.shy:1" config inner meta.show.tabs "" + config inner meta.show.exts "inner/search.js?a=1,inner/favor.js" + config inner meta.show.plug "web.dream,cli.system" ~web.code.input # wubi load file usr/wubi-dict/wubi86 diff --git a/src/h2/h2.go b/src/h2/h2.go new file mode 100644 index 00000000..31182c61 --- /dev/null +++ b/src/h2/h2.go @@ -0,0 +1,17 @@ +package h2 + +import ( + "shylinux.com/x/ice" +) + +type h2 struct { + ice.Zone + + list string `name:"list zone id auto insert" help:"示例"` +} + +func (s h2) List(m *ice.Message, arg ...string) { + s.Zone.List(m, arg...) +} + +func init() { ice.Cmd("web.code.h2.h2", h2{}) } diff --git a/src/h2/h2.js b/src/h2/h2.js new file mode 100644 index 00000000..41954ccd --- /dev/null +++ b/src/h2/h2.js @@ -0,0 +1,4 @@ +Volcanos("onimport", {help: "导入数据", _init: function(can, msg) { + msg.Echo("hello world") + msg.Dump(can) +}}) \ No newline at end of file diff --git a/src/h2/h2.shy b/src/h2/h2.shy new file mode 100644 index 00000000..2aa4717e --- /dev/null +++ b/src/h2/h2.shy @@ -0,0 +1,3 @@ +chapter "h2" + +field "示例" web.code.h2.h2 diff --git a/src/main.go b/src/main.go index 78e8c11c..b6af8d1d 100644 --- a/src/main.go +++ b/src/main.go @@ -40,6 +40,8 @@ import ( _ "shylinux.com/x/linux-story/src/qemu" _ "shylinux.com/x/contexts/src/hi" + + _ "shylinux.com/x/contexts/src/h2" ) -func main() { print(ice.Run()) } +func main() { print(ice.Run()) } \ No newline at end of file diff --git a/src/main.shy b/src/main.shy index e80a5e36..90fd6697 100644 --- a/src/main.shy +++ b/src/main.shy @@ -64,3 +64,5 @@ label ` Windows MacOSX Linux iOS Android c/c++ golang python java javascript ` + +source h2/h2.shy \ No newline at end of file