// 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 / geoos Goto Github PK
View Code? Open in Web Editor NEWThis project forked from spatial-go/geoos
A library provides spatial data and geometric algorithms
Home Page: http://www.spatial-go.com
License: GNU Lesser General Public License v2.1