// getMockWorkFunc returns a func that returns nil for the given times running, or returns the given error.
func getMockWorkFunc(num int, err error) func() error {
cnt := 0
return func() error {
cnt++
if num == cnt {
return nil
}
return err
}
}
bid0ng / gossh Goto Github PK
View Code? Open in Web Editor NEWThis project forked from windvalley/gossh
Gossh is a high-performance and high-concurrency ssh tool. Issues and ⭐ are welcome:)
License: MIT License