feat: add threads and fix log race

This commit is contained in:
崔竞宁
2022-09-10 21:58:43 +08:00
parent 5ec051f97a
commit 11e3201692
4 changed files with 90 additions and 32 deletions

12
opt.go
View File

@@ -166,12 +166,12 @@ func WithProgressBar(b bool) Option {
}
}
// func WithThreads(threads int) Option {
// return func(o *option) *option {
// o.threads = threads
// return o
// }
// }
func WithThreads(threads int) Option {
return func(o *option) *option {
o.threads = threads
return o
}
}
func WithHash(b bool) Option {
return func(o *option) *option {