File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff 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
1515import (
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
2222func updateCallback (rev string ) {
@@ -26,7 +26,7 @@ func updateCallback(rev string) {
2626func 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" )
Original file line number Diff line number Diff line change 1- module github.com/casbin/etcd-watcher
1+ module github.com/casbin/etcd-watcher/v2
22
33go 1.16
44
You can’t perform that action at this time.
0 commit comments