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

This commit is contained in:
2018-10-21 12:32:21 +02:00
parent cfac942c8a
commit 38a14d7069
+3 -4
View File
@@ -376,12 +376,11 @@ func (client *Client) EmitInput(line string, target Target) context.Context {
}
// 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()
v, ok = client.values[key]
client.mutex.RUnlock()
defer client.mutex.RUnlock()
return
return client.values[key]
}
// SetValue sets a client value.