func (h *kvHandler) Get(ctx thrift.Context, key string) (string, error) {
	if err := isValidKey(key); err != nil {
		return "", err
	}

	h.RLock()
	defer h.RUnlock()

	if val, ok := h.vals[key]; ok {
		return val, nil
	}

	return "", &keyvalue.KeyNotFound{Key: key}
}
func (h *kvHandler) Get(ctx thrift.Context, key string) (string, error) {
	if err := isValidKey(key); err != nil {
		return "", err
	}

	h.RLock()
	defer h.RUnlock()

	if val, ok := h.vals[key]; ok {
		return val, nil
	}

	return "", &keyvalue.KeyNotFound{Key: key}
}
func ( h * kvHandler ) Get ( ctx thrift . Context , key string ) ( string , error ) { if err := isValidKey ( key ) ; err != nil { return " " , err } h . RLock ( ) defer h . RUnlock ( ) if val , ok := h . vals [ key ] ; ok { return val , nil } return " " , & keyvalue . KeyNotFound { Key : key } }
// Get returns the value stored for the given key.
Get returns the value stored for the given key .