Skip to content

Instantly share code, notes, and snippets.

@kpfleming
Created September 11, 2024 21:10
Show Gist options
  • Save kpfleming/79bd1d2bab03a8c4c43c3647ecdd0591 to your computer and use it in GitHub Desktop.
Save kpfleming/79bd1d2bab03a8c4c43c3647ecdd0591 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"io/ioutil"
"github.com/fastly/fastly-go/fastly"
)
func main() {
var di = fastly.NewDomainInspector()
json, err := ioutil.ReadFile("response.json")
if err != nil {
panic(err)
}
err = di.UnmarshalJSON(json)
if err != nil {
panic(err)
}
fmt.Println(di.Timestamp)
fmt.Println(di.AggregateDelay)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment