Skip to content

Commit 3a9817c

Browse files
Added deprecate notice to NewClient(). Updated Readme with documentation links and Pkg.go.dev examples. (#29)
* [add] Added deprecate notice to NewClient() Please use NewClientFromPool() instead. [add] Updated Readme with documentation links and Pkg.go.dev examples
1 parent 3da966a commit 3a9817c

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

.github/release-drafter-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name-template: 'Version $NEXT_PATCH_VERSION - Summary Here🌈'
1+
name-template: 'Version $NEXT_PATCH_VERSION'
22
tag-template: 'v$NEXT_PATCH_VERSION'
33
categories:
44
- title: '🚀Features'
@@ -10,7 +10,7 @@ categories:
1010
- 'fix'
1111
- 'bugfix'
1212
- 'bug'
13-
- title: '🧰Maintenance'
13+
- title: 'Maintenance'
1414
label: 'chore'
1515
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
1616
exclude-labels:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ get:
2525

2626
test: get
2727
$(GOFMT) ./...
28-
$(GOTEST) -race -covermode=atomic ./...
28+
$(GOTEST) -count 1 -race -covermode=atomic ./...
2929

3030
coverage: get test
3131
$(GOTEST) -race -coverprofile=coverage.txt -covermode=atomic .

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![CircleCI](https://circleci.com/gh/RedisBloom/redisbloom-go.svg?style=svg)](https://circleci.com/gh/RedisBloom/redisbloom-go)
33
[![GitHub issues](https://img.shields.io/github/release/RedisBloom/redisbloom-go.svg)](https://github.com/RedisBloom/redisbloom-go/releases/latest)
44
[![Codecov](https://codecov.io/gh/RedisBloom/redisbloom-go/branch/master/graph/badge.svg)](https://codecov.io/gh/RedisBloom/redisbloom-go)
5-
[![GoDoc](https://godoc.org/github.com/RedisBloom/redisbloom-go?status.svg)](https://godoc.org/github.com/RedisBloom/redisbloom-go)
5+
[![GoDoc](https://godoc.org/github.com/RedisBloom/redisbloom-go?status.svg)](https://pkg.go.dev/github.com/RedisBloom/redisbloom-go)
66
[![Go Report Card](https://goreportcard.com/badge/github.com/RedisBloom/redisbloom-go)](https://goreportcard.com/report/github.com/RedisBloom/redisbloom-go)
77

88
# redisbloom-go
@@ -32,6 +32,8 @@ docker run -d -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
3232

3333
## Example Code
3434

35+
Make sure to check the full list of examples at [Pkg.go.dev](https://pkg.go.dev/github.com/RedisBloom/redisbloom-go#pkg-examples).
36+
3537
```go
3638
package main
3739

@@ -60,6 +62,8 @@ func main() {
6062

6163
## Supported RedisBloom Commands
6264

65+
Make sure to check the full command reference at [redisbloom.io](https://redisbloom.io).
66+
6367
### Bloom Filter
6468

6569
| Command | Recommended API and godoc |

client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
// Client Max Connections
1313
var maxConns = 500
1414

15-
// Client is an interface to time series redis commands
15+
// Client is an interface to RedisBloom redis commands
1616
type Client struct {
1717
Pool ConnPool
1818
Name string
@@ -21,6 +21,7 @@ type Client struct {
2121
// NewClient creates a new client connecting to the redis host, and using the given name as key prefix.
2222
// Addr can be a single host:port pair, or a comma separated list of host:port,host:port...
2323
// In the case of multiple hosts we create a multi-pool and select connections at random
24+
// Deprecated: Please use NewClientFromPool() instead
2425
func NewClient(addr, name string, authPass *string) *Client {
2526
addrs := strings.Split(addr, ",")
2627
var pool ConnPool

pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ func testOnBorrow(c redis.Conn, t time.Time) (err error) {
101101
if time.Since(t) > time.Minute {
102102
_, err = c.Do("PING")
103103
}
104-
return err
104+
return
105105
}

0 commit comments

Comments
 (0)