mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 03:17:43 +08:00
17 lines
374 B
Go
17 lines
374 B
Go
package eventlog
|
|
|
|
import "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context"
|
|
|
|
func ExampleEventLogger() {
|
|
{
|
|
log := EventLogger(nil)
|
|
e := log.EventBegin(context.Background(), "dial")
|
|
e.Done()
|
|
}
|
|
{
|
|
log := EventLogger(nil)
|
|
e := log.EventBegin(context.Background(), "dial")
|
|
_ = e.Close() // implements io.Closer for convenience
|
|
}
|
|
}
|