1 Star 0 Fork 0

h79/goutils

Create your Gitee Account
Explore and code with more than 13.5 million developers,Free private repositories !:)
Sign up
文件
alarm
api
auth
build
common
algorithm
app
archive
e7z
gzip
tar
targz
tarxz
testdata
zip
archive.go
multi.go
zip.go
attributes
banner
bus
coder
compress
config
data
debug
file
flow/flow
git
http
images
json
list
logger
mapper
option
queue
random
result
scheduler
secret
server
ssh
stringutil
svc
system
tag
template
timer
tls
trie
version
watcher
xml
yaml
bit_flag.go
common.go
integer.go
dao
discovery
loader
mq
perf
plugins
request
rpc
sensitive
thrift
.gitignore
LICENSE
Makefile
README.md
doc.go
error.md
go.mod
go.sum
goutils.go
goutils_test.go
version.go
Clone or Download
multi.go 587 Bytes
Copy Edit Raw Blame History
huqiuyun authored a year ago . build
package archive
import (
fileconfig "gitee.com/h79/goutils/common/file/config"
)
type multiArchive struct {
ars []Archive
}
func NewMulti(ar []Archive) Archive {
return &multiArchive{ars: ar}
}
// Close al.
func (a *multiArchive) Close() error {
for i := range a.ars {
err := a.ars[i].Close()
if err != nil {
return err
}
}
return nil
}
// Add file to the archive.
func (a *multiArchive) Add(f fileconfig.File, stream ...fileconfig.ReaderStream) error {
for i := range a.ars {
err := a.ars[i].Add(f, stream...)
if err != nil {
return err
}
}
return nil
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/h79/goutils.git
git@gitee.com:h79/goutils.git
h79
goutils
goutils
v1.20.123

Search