14 lines
205 B
Go
14 lines
205 B
Go
package gobstore
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
)
|
|
|
|
// timer is a helper function
|
|
func timer(name string) func() {
|
|
start := time.Now()
|
|
return func() {
|
|
fmt.Printf("%s took %v\n", name, time.Since(start))
|
|
}
|
|
}
|