From 7d415f29d0809a6dd8ce8924a2453fdc823287dd Mon Sep 17 00:00:00 2001 From: shylinux Date: Tue, 8 Aug 2023 03:45:21 +0800 Subject: [PATCH] add some --- src/template/web.code.go/demo.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/template/web.code.go/demo.go b/src/template/web.code.go/demo.go index 4210846d..8a5a79b0 100644 --- a/src/template/web.code.go/demo.go +++ b/src/template/web.code.go/demo.go @@ -1,5 +1,15 @@ -package %s +package {{.Option "zone"}} -func init() { - +import ( + "shylinux.com/x/ice" +) + +type {{.Option "name"}} struct { + list string `name:"list path auto" help:"示例"` } + +func (s {{.Option "name"}}) List(m *ice.Message, arg ...string) { + m.Echo("hello world") +} + +func init() { ice.Cmd("{{.Option "key"}}", {{.Option "name"}}{}) }