forked from x/icebergs
add some
This commit is contained in:
parent
b71cf092a2
commit
d3e0e06831
@ -29,8 +29,6 @@ func _space_qrcode(m *ice.Message, dev string) {
|
|||||||
}
|
}
|
||||||
func _space_dial(m *ice.Message, dev, name string, arg ...string) {
|
func _space_dial(m *ice.Message, dev, name string, arg ...string) {
|
||||||
origin := m.Cmdv(SPIDE, dev, CLIENT_ORIGIN)
|
origin := m.Cmdv(SPIDE, dev, CLIENT_ORIGIN)
|
||||||
m.Info("what %v", origin)
|
|
||||||
m.Info("what %v", m.Cmd(SPIDE, dev).FormatMeta())
|
|
||||||
u := kit.ParseURL(kit.MergeURL2(strings.Replace(origin, HTTP, "ws", 1), PP(SPACE), mdb.TYPE, ice.Info.NodeType, mdb.NAME, name, mdb.NAME, "", mdb.ICONS, mdb.Config(m, mdb.ICONS),
|
u := kit.ParseURL(kit.MergeURL2(strings.Replace(origin, HTTP, "ws", 1), PP(SPACE), mdb.TYPE, ice.Info.NodeType, mdb.NAME, name, mdb.NAME, "", mdb.ICONS, mdb.Config(m, mdb.ICONS),
|
||||||
mdb.TIME, ice.Info.Make.Time, nfs.MODULE, ice.Info.Make.Module, nfs.VERSION, ice.Info.Make.Versions(), cli.GOOS, runtime.GOOS, cli.GOARCH, runtime.GOARCH, arg))
|
mdb.TIME, ice.Info.Make.Time, nfs.MODULE, ice.Info.Make.Module, nfs.VERSION, ice.Info.Make.Versions(), cli.GOOS, runtime.GOOS, cli.GOARCH, runtime.GOARCH, arg))
|
||||||
args := kit.SimpleKV("type,name,host,port", u.Scheme, dev, u.Hostname(), kit.Select(kit.Select(tcp.PORT_443, tcp.PORT_80, u.Scheme == "ws"), u.Port()))
|
args := kit.SimpleKV("type,name,host,port", u.Scheme, dev, u.Hostname(), kit.Select(kit.Select(tcp.PORT_443, tcp.PORT_80, u.Scheme == "ws"), u.Port()))
|
||||||
|
4
misc.go
4
misc.go
@ -79,8 +79,12 @@ func (m *Message) SetAppend(arg ...string) *Message {
|
|||||||
}
|
}
|
||||||
func (m *Message) SetResult(arg ...string) *Message { return m.Set(MSG_RESULT, arg...) }
|
func (m *Message) SetResult(arg ...string) *Message { return m.Set(MSG_RESULT, arg...) }
|
||||||
func (m *Message) PushRecord(value Any, arg ...string) *Message {
|
func (m *Message) PushRecord(value Any, arg ...string) *Message {
|
||||||
|
if m.FieldsIsDetail() {
|
||||||
|
return m.PushDetail(value, arg...)
|
||||||
|
} else {
|
||||||
return m.Push("", value, kit.Split(kit.Join(arg)))
|
return m.Push("", value, kit.Split(kit.Join(arg)))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
func (m *Message) PushDetail(value Any, arg ...string) *Message {
|
func (m *Message) PushDetail(value Any, arg ...string) *Message {
|
||||||
switch v := value.(type) {
|
switch v := value.(type) {
|
||||||
case string:
|
case string:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user