mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-06-29 16:20:46 +00:00
Refactoring codes for removing buffer size options. An some other changes...
Former-commit-id: 10b57cc1a27446ade3c444217341e9651e89cdce
This commit is contained in:
@ -11,7 +11,6 @@ type _Options struct {
|
||||
withProgressBar bool
|
||||
parallelWorkers int
|
||||
batchSize int
|
||||
bufferSize int
|
||||
}
|
||||
|
||||
// Options stores a set of option usable by the
|
||||
@ -56,16 +55,6 @@ func OptionAllowedMismatches(count int) WithOption {
|
||||
return f
|
||||
}
|
||||
|
||||
// OptionBufferSize sets the requested channel
|
||||
// buffer size.
|
||||
func OptionBufferSize(size int) WithOption {
|
||||
f := WithOption(func(opt Options) {
|
||||
opt.pointer.bufferSize = size
|
||||
})
|
||||
|
||||
return f
|
||||
}
|
||||
|
||||
// OptionParallelWorkers sets how many search
|
||||
// jobs will be run in parallel.
|
||||
func OptionParallelWorkers(nworkers int) WithOption {
|
||||
@ -102,12 +91,6 @@ func (options Options) WithProgressBar() bool {
|
||||
return options.pointer.withProgressBar
|
||||
}
|
||||
|
||||
// BufferSize returns the size of the channel
|
||||
// buffer specified by the options
|
||||
func (options Options) BufferSize() int {
|
||||
return options.pointer.bufferSize
|
||||
}
|
||||
|
||||
// BatchSize returns the size of the
|
||||
// sequence batch used by the PCR algorithm
|
||||
func (options Options) BatchSize() int {
|
||||
@ -130,7 +113,6 @@ func MakeOptions(setters []WithOption) Options {
|
||||
withProgressBar: false,
|
||||
parallelWorkers: 4,
|
||||
batchSize: 1000,
|
||||
bufferSize: 100,
|
||||
}
|
||||
|
||||
opt := Options{&o}
|
||||
|
Reference in New Issue
Block a user