MCPcopy Create free account
hub / github.com/deepflowio/deepflow / validateBody

Function validateBody

cli/ctl/domain.go:354–374  ·  view source on GitHub ↗
(body map[string]interface{})

Source from the content-addressed store, hash-verified

352}
353
354func validateBody(body map[string]interface{}) bool {
355 n, ok := body["NAME"]
356 if ok {
357 switch n.(type) {
358 case string:
359 default:
360 fmt.Println("invalid type (NAME), please specify as string")
361 return false
362 }
363 }
364 t, ok := body["TYPE"]
365 if ok {
366 switch t.(type) {
367 case string:
368 default:
369 fmt.Println("invalid type (TYPE), please specify as string")
370 return false
371 }
372 }
373 return true
374}

Callers 2

createDomainFunction · 0.85
updateDomainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected