1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 09:08:06 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-04-26 00:31:23 +08:00
parent 281840b799
commit 6352d73905
5 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 码神
Copyright (c) 2020 shylinux
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -142,7 +142,6 @@ func Copy(m *ice.Message, w io.Writer, r io.Reader, cb ice.Any) {
}
func CopyStream(m *ice.Message, to io.WriteCloser, from io.ReadCloser, cache, total int, cb ice.Any) {
count, buf := 0, make([]byte, cache)
kit.If(total == 0, func() { total = 1 })
for {
n, e := from.Read(buf)
to.Write(buf[0:n])

View File

@ -26,7 +26,7 @@ func _spide_create(m *ice.Message, name, link string) {
m.Logs(mdb.INSERT, SPIDE, name, LINK, link)
mdb.HashSelectUpdate(m, mdb.HashCreate(m, CLIENT_NAME, name), func(value ice.Map) {
value[SPIDE_CLIENT] = kit.Dict(mdb.NAME, name, SPIDE_METHOD, http.MethodPost, "url", link, ORIGIN, u.Scheme+"://"+u.Host,
tcp.PROTOCOL, u.Scheme, tcp.HOSTNAME, u.Hostname(), tcp.HOST, u.Host, nfs.PATH, dir, nfs.FILE, file, cli.TIMEOUT, "30s",
tcp.PROTOCOL, u.Scheme, tcp.HOSTNAME, u.Hostname(), tcp.HOST, u.Host, nfs.PATH, dir, nfs.FILE, file, cli.TIMEOUT, "3s",
)
})
}

View File

@ -14,7 +14,7 @@ func (m *Message) PrefixKey(arg ...string) string {
return kit.Keys(m.Prefix(m.CommandKey()), kit.Keys(arg))
}
func (m *Message) PrefixPath(arg ...Any) string {
return strings.TrimPrefix(path.Join(strings.ReplaceAll(m.Prefix(m._key, kit.Keys(arg...)), PT, PS)), WEB) + PS
return strings.TrimPrefix(path.Join(kit.ReplaceAll(m.Prefix(m._key, kit.Keys(arg...)), PT, PS)), WEB) + PS
}
func (m *Message) Prefix(arg ...string) string { return m.Target().Prefix(arg...) }
func (m *Message) Confv(arg ...Any) (val Any) {

2
go.mod
View File

@ -1,6 +1,6 @@
module shylinux.com/x/icebergs
go 1.11
go 1.13
require (
shylinux.com/x/go-git/v5 v5.6.3