You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
321 B
21 lines
321 B
package m9zApi
|
|
|
|
const (
|
|
defaultLoopCount = 10
|
|
maxLoopCount = 10
|
|
)
|
|
|
|
func configuredLoopCount() int {
|
|
return scanConfigManager.GetLoopCount()
|
|
}
|
|
|
|
func normalizeLoopCount(loopCount int) int {
|
|
if loopCount <= 0 {
|
|
return defaultLoopCount
|
|
}
|
|
if loopCount > maxLoopCount {
|
|
return maxLoopCount
|
|
}
|
|
return loopCount
|
|
}
|