MCPcopy Create free account
hub / github.com/couchbase/cbft / ParseExtras

Function ParseExtras

extras.go:15–27  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

13)
14
15func ParseExtras(s string) (map[string]string, error) {
16 rv := map[string]string{}
17
18 err := json.Unmarshal([]byte(s), &rv)
19 if err != nil {
20 // Early versions of cbft-to-ns_server integration had a
21 // simple, non-JSON "host:port" format for the nodeDef.Extras,
22 // so fall back to that.
23 rv["nsHostPort"] = s
24 }
25
26 return rv, nil
27}

Callers 2

mainStartFunction · 0.92
NsHostsForIndexFunction · 0.85

Calls 1

UnmarshalMethod · 0.80

Tested by

no test coverage detected