diff --git a/get_by_key.go b/get_by_key.go index 1e30cff..ced4a23 100644 --- a/get_by_key.go +++ b/get_by_key.go @@ -16,11 +16,11 @@ func (s Server) GetValueByKey(ctx context.Context, key string) string { return value } -// GetValueByKeyWithBinding ... -func (s Server) GetValueByKeyWithBinding(ctx context.Context, key string, result interface{}) error { +// GetValueByKeyWithBindData ... +func (s Server) GetValueByKeyWithBindData(ctx context.Context, key string, result interface{}) error { v := s.GetValueByKey(ctx, key) if v == "" { return errors.New("key not found") } - return json.Unmarshal([]byte(v), result) + return json.Unmarshal([]byte(v), &result) }