MCPcopy
hub / github.com/projectdiscovery/proxify / InterfaceToType

Function InterfaceToType

pkg/swaggergen/schema.go:41–56  ·  view source on GitHub ↗
(data interface{})

Source from the content-addressed store, hash-verified

39}
40
41func InterfaceToType(data interface{}) string {
42 switch data.(type) {
43 case map[string]interface{}:
44 return "object"
45 case []interface{}:
46 return "array"
47 case string:
48 return "string"
49 case float64:
50 return "number"
51 case bool:
52 return "boolean"
53 default:
54 return "notfound"
55 }
56}

Callers 1

NewSchemaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected