package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Nov 15, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
goo-context
Cancel
func main() {
for {
select {
case <-goo_context.Cancel().Done():
goo_log.Debug("exit")
return
default:
goo_log.Debug(time.Now().Format("15:04:05"))
time.Sleep(time.Second)
}
}
}
Timeout
func main() {
ctx := goo_context.Timeout(5 * time.Second)
for {
select {
case <-ctx.Done():
goo_log.Debug("exit")
return
default:
goo_log.Debug(time.Now().Format("15:04:05"))
time.Sleep(time.Second)
}
}
}
Documentation
¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.