Skip to content

Commit b3e1488

Browse files
committed
chore: bumps go module to /v2
BREAKING CHANGE: The module is now accessible at github.com/casbin/etcd-watcher/v2 Signed-off-by: Ankit R Gadiya <ankit.gadiya@rapyuta-robotics.com>
1 parent be15749 commit b3e1488

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Etcd Watcher is the [Etcd](https://github.com/coreos/etcd) watcher for [Casbin](
55

66
## Installation
77

8-
go get github.com/casbin/etcd-watcher
8+
go get github.com/casbin/etcd-watcher/v2
99

1010
## Simple Example
1111

@@ -15,8 +15,8 @@ package main
1515
import (
1616
"log"
1717

18-
"github.com/casbin/casbin"
19-
"github.com/casbin/etcd-watcher"
18+
casbin "github.com/casbin/casbin/v2"
19+
etcdwatcher "github.com/casbin/etcd-watcher/v2"
2020
)
2121

2222
func updateCallback(rev string) {
@@ -26,7 +26,7 @@ func updateCallback(rev string) {
2626
func main() {
2727
// Initialize the watcher.
2828
// Use the endpoint of etcd cluster as parameter.
29-
w, _ := etcdwatcher.NewWatcher("http://127.0.0.1:2379")
29+
w, _ := etcdwatcher.NewWatcher([]string{"http://127.0.0.1:2379"}, "keyname")
3030

3131
// Initialize the enforcer.
3232
e, _ := casbin.NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv")

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/casbin/etcd-watcher
1+
module github.com/casbin/etcd-watcher/v2
22

33
go 1.16
44

0 commit comments

Comments
 (0)