This repository was archived by the owner on Nov 12, 2024. It is now read-only.
Description Example:
package main
import (
"fmt"
)
func main () {
tags := make (map [string ]string )
tags ["schema" ] = "identity"
tags ["table" ] = "user"
fields := make (map [string ]interface {})
fields ["percentage" ] = 10
item := make (map [string ]interface {})
item ["tags" ] = tags
item ["fields" ] = fields
metric := make (map [string ][]map [string ]interface {})
metric ["mysql_overflow" ] = append (metric ["mysql_overflow" ], item )
metrics := make (map [string ][]map [string ][]map [string ]interface {})
metrics ["127.0.0.1" ] = append (metrics ["127.0.0.1" ], metric )
fmt .Println (fmt .Sprintf ("%#v" , metrics ))
}
Output
map[string][]map[string][]map[string]interface {}{
"127.0.0.1":[]map[string][]map[string]interface {}{
map[string][]map[string]interface {}{
"mysql_overflow":[]map[string]interface {}{
map[string]interface {}{
"fields":map[string]interface {}{"percentage":10},
"tags":map[string]string{
"schema":"identity",
"table":"user"}}}}}}
Reactions are currently unavailable
Example:
Output