1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 08:48:06 +08:00

opt module

This commit is contained in:
harveyshao 2023-02-20 01:07:43 +08:00
parent 3a1aa7a593
commit 0c08e5eb9d
8 changed files with 18 additions and 67 deletions

2
go.mod
View File

@ -7,7 +7,7 @@ replace (
shylinux.com/x/linux-story => ./usr/linux-story
shylinux.com/x/mysql-story => ./usr/mysql-story
shylinux.com/x/nginx-story => ./usr/nginx-story
shylinux.com/x/redis-story => ./usr/redis-story
// shylinux.com/x/redis-story => ./usr/redis-story
)
replace (

4
go.sum
View File

@ -8,6 +8,10 @@ shylinux.com/x/go-sql-mysql v0.0.2 h1:XcsMEF3KnFmRu6EmxIwIF6M1o2tD1NQvel3U9m+1Ap
shylinux.com/x/go-sql-mysql v0.0.2/go.mod h1:lHjRMZz5Lii6U+49fhkbCWgsnL+yux54SYJYWqASN8Y=
shylinux.com/x/gogit v0.0.7 h1:2ep5QpXWLs0UBCywJuUHda/aagskYvFmn0nj3vpEdY4=
shylinux.com/x/gogit v0.0.7/go.mod h1:wYfHxpQT1C8yNV+yC1jStIy0I12bfUCyJARhn0sNn1M=
shylinux.com/x/golang-story v0.5.8 h1:HmP0VhtcVn/7RqMKNqstq9sLIJLGZpOGf2AphfoHJS8=
shylinux.com/x/golang-story v0.5.8/go.mod h1:bv5ap76+uMkMLBlztFMQSZKmci2plRnw1SeJBulfAlw=
shylinux.com/x/redis-story v0.5.8 h1:1MGebd/6YMFGULvPgcroEr2kLcSuLy1YHjisR8TpuDg=
shylinux.com/x/redis-story v0.5.8/go.mod h1:5PAglQTnrWoCzog5RrQTtmQTH4feKEJIYon6t0tfr2g=
shylinux.com/x/websocket v0.0.2 h1:aeeZyAsh6QN7+l5oMXlO9/rlQgx6CHvDtpZyAqMCSlU=
shylinux.com/x/websocket v0.0.2/go.mod h1:yMcu4XS6JB11YRISXwvubh7dPM6rWPdzIRv0CrshQBY=
shylinux.com/x/webview v0.0.2 h1:T0f2sDdiMCdDPjYwD1WS64ASBGwvZKPZkxDQ84d+ZQs=

View File

@ -8,6 +8,10 @@ shylinux.com/x/go-sql-mysql v0.0.2 h1:XcsMEF3KnFmRu6EmxIwIF6M1o2tD1NQvel3U9m+1Ap
shylinux.com/x/go-sql-mysql v0.0.2/go.mod h1:lHjRMZz5Lii6U+49fhkbCWgsnL+yux54SYJYWqASN8Y=
shylinux.com/x/gogit v0.0.7 h1:2ep5QpXWLs0UBCywJuUHda/aagskYvFmn0nj3vpEdY4=
shylinux.com/x/gogit v0.0.7/go.mod h1:wYfHxpQT1C8yNV+yC1jStIy0I12bfUCyJARhn0sNn1M=
shylinux.com/x/golang-story v0.5.8 h1:HmP0VhtcVn/7RqMKNqstq9sLIJLGZpOGf2AphfoHJS8=
shylinux.com/x/golang-story v0.5.8/go.mod h1:bv5ap76+uMkMLBlztFMQSZKmci2plRnw1SeJBulfAlw=
shylinux.com/x/redis-story v0.5.8 h1:1MGebd/6YMFGULvPgcroEr2kLcSuLy1YHjisR8TpuDg=
shylinux.com/x/redis-story v0.5.8/go.mod h1:5PAglQTnrWoCzog5RrQTtmQTH4feKEJIYon6t0tfr2g=
shylinux.com/x/websocket v0.0.2 h1:aeeZyAsh6QN7+l5oMXlO9/rlQgx6CHvDtpZyAqMCSlU=
shylinux.com/x/websocket v0.0.2/go.mod h1:yMcu4XS6JB11YRISXwvubh7dPM6rWPdzIRv0CrshQBY=
shylinux.com/x/webview v0.0.2 h1:T0f2sDdiMCdDPjYwD1WS64ASBGwvZKPZkxDQ84d+ZQs=

View File

@ -1,17 +0,0 @@
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{}) }

View File

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

View File

@ -12,13 +12,15 @@ type hi struct {
}
func (s hi) Show(m *ice.Message, arg ...string) {
m.Echo("hello world")
m.StatusTime()
m.Echo("hello world").StatusTime()
}
func (s hi) List(m *ice.Message, arg ...string) {
// ctx.Display(m, "hi.js")
// ctx.Display(m, "/require/shylinux.com/x/contexts@v2.9.2/src/hi/hi.js")
// ctx.Display(m, "http://localhost:9020/require/shylinux.com/x/contexts@v2.9.2/src/hi/hi.js")
ctx.Display(m, "https://shylinux.com/x/contexts@v2.9.2/src/hi/hi.js?content=what")
s.Zone.ListPage(m, arg...)
ctx.Display
}
func init() { ice.Cmd("web.code.hi.hi", hi{}) }

View File

@ -1,43 +1,4 @@
Volcanos(chat.ONIMPORT, {_init: function(can, msg) {
msg.Defer(function() { msg.Dump() })
can.misc.Info("what", can.base.MergeURL(location.href, "hi", 123, "debug", undefined))
can.misc.Info("what", can.base.ParseURL(location.href))
can.misc.Info("what", can.base.ParseJSON(location.href))
can.misc.Info("what", can.base.ParseJSON('{"hi":1}'))
can.misc.Info("what", can.base.ParseSize('1k'))
can.misc.Info("what", can.base.ParseSize('1.2k'))
can.misc.Info("what", can.base.Size('1224'))
msg.Echo("hello world\n")
}})
msg.Echo("hello world\n"+(can.Conf("content")||""))
}})

View File

@ -43,7 +43,7 @@ import (
_ "shylinux.com/x/golang-story/src/kubernetes"
_ "shylinux.com/x/golang-story/src/prometheus"
_ "shylinux.com/x/contexts/src/h2"
_ "shylinux.com/x/contexts/src/hi"
)
func main() { print(ice.Run()) }
func main() { print(ice.Run()) }