github.com/laof/lite-speed-test@v0.0.0-20230930011949-1f39b7037845/test/main.go (about) 1 package main 2 3 import ( 4 "fmt" 5 6 "github.com/laof/lite-speed-test/data" 7 ) 8 9 func main() { 10 obj := data.Nodes{Url: "fjson", Max: 1} 11 data, err := obj.Get() 12 13 if err != nil { 14 return 15 } 16 17 // fmt.Println(data) 18 res, _ := obj.Test(data) 19 20 fmt.Println(res.SuccessNodes) 21 fmt.Println(res.ErrorServers) 22 23 }