mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 00:25:55 +00:00
Add comments
This commit is contained in:
parent
7dfb53d08e
commit
a6cda39866
1 changed files with 2 additions and 0 deletions
|
|
@ -140,6 +140,7 @@ func Serial(bs ...Benchmark) Benchmark {
|
|||
}
|
||||
}
|
||||
|
||||
// wrapper type to force human-readable JSON output
|
||||
type PrettyDuration time.Duration
|
||||
|
||||
func (d PrettyDuration) MarshalJSON() ([]byte, error) {
|
||||
|
|
@ -147,6 +148,7 @@ func (d PrettyDuration) MarshalJSON() ([]byte, error) {
|
|||
return []byte("\"" + s + "\""), nil
|
||||
}
|
||||
|
||||
// Recursively replaces elements of ugly types with their pretty wrappers
|
||||
func Prettify(m map[string]interface{}) map[string]interface{} {
|
||||
newmap := make(map[string]interface{})
|
||||
for k, v := range m {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue