1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-03-03 08:50:44 +08:00
parent 0ec2f3fd3a
commit 17e1ce0f32
5 changed files with 28 additions and 0 deletions

20
src/h2/h2.go Normal file
View File

@ -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{}) }

3
src/h2/h2.shy Normal file
View File

@ -0,0 +1,3 @@
chapter "h2"
field web.code.h2.h2

View File

@ -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()) }

View File

@ -64,3 +64,4 @@ field "架构图" web.code.git.spide args `intshell`
spark md README.md
source h2/h2.shy
source h2/h2.shy

View File

@ -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 }