MCPcopy
hub / github.com/shadowsocks/v2ray-plugin / Get

Method Get

args.go:26–35  ·  view source on GitHub ↗

Get the first value associated with the given key. If there are any values associated with the key, the value return has the value and ok is set to true. If there are no values for the given key, value is "" and ok is false. If you need access to multiple values, use the map directly.

(key string)

Source from the content-addressed store, hash-verified

24// true. If there are no values for the given key, value is "" and ok is false.
25// If you need access to multiple values, use the map directly.
26func (args Args) Get(key string) (value string, ok bool) {
27 if args == nil {
28 return "", false
29 }
30 vals, ok := args[key]
31 if !ok || len(vals) == 0 {
32 return "", false
33 }
34 return vals[0], true
35}
36
37// Append value to the list of values for key.
38func (args Args) Add(key, value string) {

Callers 1

startV2RayFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected