From 043586efcb7c47d6c2a0c21bdbe78e7d3ba403c4 Mon Sep 17 00:00:00 2001 From: shylinux Date: Fri, 7 Apr 2023 00:25:33 +0800 Subject: [PATCH] opt type --- demo.txt | 9 +++++++++ demo1.txt | 10 ++++++++++ src/demo.shy | 24 ++++++------------------ src/script/web.chat.favor/list.shy | 8 -------- src/script/web.chat.favor/onimport.shy | 4 ---- 5 files changed, 25 insertions(+), 30 deletions(-) create mode 100644 demo.txt create mode 100644 demo1.txt delete mode 100644 src/script/web.chat.favor/list.shy delete mode 100644 src/script/web.chat.favor/onimport.shy diff --git a/demo.txt b/demo.txt new file mode 100644 index 00000000..d33b74a3 --- /dev/null +++ b/demo.txt @@ -0,0 +1,9 @@ +IF(E4 > 3000, + IF(E4 > 10000, + IF(E4 > 50000, + IF(E4 > 100000, + IF(E4 > 500000, + 200, + 100+E4-100000, + ) + ) diff --git a/demo1.txt b/demo1.txt new file mode 100644 index 00000000..3f3f4554 --- /dev/null +++ b/demo1.txt @@ -0,0 +1,10 @@ +IF(E4 > 500000, 200, + IF(E4 > 100000, 100+E4-10000, + IF(E4 > 50000, + IF(E4 > 10000, + IF(E4 > 3000, + ) + ) + ) +) + diff --git a/src/demo.shy b/src/demo.shy index 0c539f2f..66a48403 100644 --- a/src/demo.shy +++ b/src/demo.shy @@ -1,23 +1,11 @@ package tmux -import ( - ice "shylinux.com/x/icebergs" - "shylinux.com/x/icebergs/base/cli" - kit "shylinux.com/x/toolkits" -) +import "shylinux.com/x/ice" -func init() { m.DebugStack() } +type tmux struct{} -const TMUX = "tmux" +func (s tmux) List(m *ice.Message, arg ...string) { + m.Echo("hello world") +} -var Index = &ice.Context{Name: TMUX, Help: "工作台", Commands: ice.Commands{ - TMUX: {Name: "tmux path auto start order build download", Help: "服务", Actions: ice.MergeActions(ice.Actions{ - cli.START: {Help: "启动", Hand: func(m *ice.Message, arg ...string) {}}, - }), Hand: func(m *ice.Message, arg ...string) {}}, -}} - -// func init() { code.Index.Register(Index, &web.Frame{}) } -func init() { m.DebugStack() } -func init() { m.Echo(kit.Formats(Index)) } -func init() { m.Echo(kit.Formats(Index.Name)) } -func init() { m.Echo(kit.Formats(Index.Commands[TMUX].Name)) } +func init() { ice.Cmd("web.code.tmux2.tmux2", tmux{}) } diff --git a/src/script/web.chat.favor/list.shy b/src/script/web.chat.favor/list.shy deleted file mode 100644 index c9899524..00000000 --- a/src/script/web.chat.favor/list.shy +++ /dev/null @@ -1,8 +0,0 @@ -func create(m, type) { - m.Echo("hello world") -} -func list(m, hash) { - m.Echo("hello world") - m.Echo("hello world") - m.Action("create").StatusTime().Display() -} \ No newline at end of file diff --git a/src/script/web.chat.favor/onimport.shy b/src/script/web.chat.favor/onimport.shy deleted file mode 100644 index 2ec291a2..00000000 --- a/src/script/web.chat.favor/onimport.shy +++ /dev/null @@ -1,4 +0,0 @@ -func _init(can, msg) { - msg.Echo("hello world") - msg.Dump(can) -}