Browse Source

client: Changed Value to return the value only, not value and ok

master
Gisle Aune 6 years ago
parent
commit
38a14d7069
  1. 7
      client.go

7
client.go

@ -376,12 +376,11 @@ func (client *Client) EmitInput(line string, target Target) context.Context {
} }
// Value gets a client value. // Value gets a client value.
func (client *Client) Value(key string) (v interface{}, ok bool) {
func (client *Client) Value(key string) interface{} {
client.mutex.RLock() client.mutex.RLock()
v, ok = client.values[key]
client.mutex.RUnlock()
defer client.mutex.RUnlock()
return
return client.values[key]
} }
// SetValue sets a client value. // SetValue sets a client value.

Loading…
Cancel
Save