MCPcopy Create free account
hub / github.com/google/gapid / queryObject

Function queryObject

test/robot/web/client/data.go:305–321  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

303}
304
305func queryObject(path string) map[string]interface{} {
306 resp, err := http.Get(path)
307 if err != nil {
308 panic(err)
309 }
310 defer resp.Body.Close()
311 body, err := ioutil.ReadAll(resp.Body)
312 if err != nil {
313 panic(err)
314 }
315
316 arr := map[string]interface{}{}
317 if err := json.Unmarshal(body, &arr); err != nil {
318 panic(err)
319 }
320 return arr
321}
322
323func clearDimensionData() {
324 for _, d := range dimensions {

Callers 1

mainFunction · 0.85

Calls 3

UnmarshalMethod · 0.80
GetMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected