MCPcopy Index your code
hub / github.com/apache/cloudstack-go / getRawValue

Function getRawValue

test/cloudstack_test.go:79–88  ·  view source on GitHub ↗
(b json.RawMessage)

Source from the content-addressed store, hash-verified

77}
78
79func getRawValue(b json.RawMessage) (json.RawMessage, error) {
80 var m map[string]json.RawMessage
81 if err := json.Unmarshal(b, &m); err != nil {
82 return nil, err
83 }
84 for _, v := range m {
85 return v, nil
86 }
87 return nil, fmt.Errorf("Unable to extract the raw value from:\n\n%s\n\n", string(b))
88}
89
90func readData(file string) (map[string]json.RawMessage, error) {
91 var data map[string]json.RawMessage

Callers 1

CreateTestServerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected