diff --git a/src/h2/h2.go b/src/h2/h2.go new file mode 100644 index 00000000..5f48deab --- /dev/null +++ b/src/h2/h2.go @@ -0,0 +1,20 @@ +package h2 + +import ( + "shylinux.com/x/ice" +) + +type h2 struct { + ice.Zone + + list string `name:"list zone id auto insert show" help:"示例"` +} + +func (s h2) Show(m *ice.Message, arg ...string) { + m.Echo("hello world") +} +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.shy b/src/h2/h2.shy new file mode 100644 index 00000000..e4e97694 --- /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 acfca066..089f1718 100644 --- a/src/main.go +++ b/src/main.go @@ -44,6 +44,8 @@ import ( _ "shylinux.com/x/golang-story/src/prometheus" _ "shylinux.com/x/contexts/src/hi" + + _ "shylinux.com/x/contexts/src/h2" ) func main() { print(ice.Run()) } diff --git a/src/main.shy b/src/main.shy index 4c431cac..ab93ebd2 100644 --- a/src/main.shy +++ b/src/main.shy @@ -64,3 +64,4 @@ field "架构图" web.code.git.spide args `intshell` spark md README.md source h2/h2.shy +source h2/h2.shy diff --git a/src/webview.go b/src/webview.go index a170aece..64089def 100644 --- a/src/webview.go +++ b/src/webview.go @@ -10,6 +10,8 @@ import ( "shylinux.com/x/icebergs/base/web" "shylinux.com/x/icebergs/misc/webview" kit "shylinux.com/x/toolkits" + + _ "shylinux.com/x/contexts/src/h2" ) type view struct{ *webview.WebView }