Documentation ¶ Index ¶ Variables func Run(fn func() error, timeout time.Duration) error Constants ¶ This section is empty. Variables ¶ View Source var ( ErrTimedOut = fmt.Errorf("Function call timed out.") ) Functions ¶ func Run ¶ func Run(fn func() error, timeout time.Duration) error Run the given function with the given timeout. Return any error returned by the function, or ErrTimedOut if the timeout took place. The function is not interrupted if the timeout takes place. Types ¶ This section is empty. Source Files ¶ View all Source files timeout.go Click to show internal directories. Click to hide internal directories.