[tor-commits] [goptlib/master] Guarantee that Args.Get returns "" if no value.
dcf at torproject.org
dcf at torproject.org
Fri Jan 31 05:55:50 UTC 2014
commit c812cfc02d660834e3f5a5af9e25c123beccf36f
Author: David Fifield <david at bamsoftware.com>
Date: Thu Jan 30 21:55:32 2014 -0800
Guarantee that Args.Get returns "" if no value.
---
args.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/args.go b/args.go
index 6289c8c..5e96589 100644
--- a/args.go
+++ b/args.go
@@ -14,7 +14,8 @@ import (
type Args map[string][]string
// Get the first value associated with the given key. If there are any values
-// associated with the key, the ok return value is true; otherwise it is false.
+// 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.
func (args Args) Get(key string) (value string, ok bool) {
if args == nil {
More information about the tor-commits
mailing list