Skip to content

Commit

Permalink
breaking change: #233 update example with new provider signature
Browse files Browse the repository at this point in the history
  • Loading branch information
missedone committed Sep 15, 2023
1 parent eb3c196 commit b40e58a
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions examples/complex-etcd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ func main() {
Prefix: false,
Key: "single_key",
}
provider := etcd.Provider(providerCfg)
provider, err := etcd.Provider(providerCfg)
if err != nil {
log.Fatal("Cannot etcd provider: %v", err)
}

if err := kCheck.Load(provider, nil); err != nil {
log.Fatalf("error loading config: %v", err)
Expand Down Expand Up @@ -109,7 +112,10 @@ func main() {
Prefix: true,
Key: "parent",
}
provider = etcd.Provider(providerCfg)
provider, err = etcd.Provider(providerCfg)
if err != nil {
log.Fatal("Cannot etcd provider: %v", err)
}

if err := kCheck.Load(provider, nil); err != nil {
log.Fatalf("error loading config: %v", err)
Expand Down Expand Up @@ -154,7 +160,10 @@ func main() {
Key: "child",
}

provider = etcd.Provider(providerCfg)
provider, err = etcd.Provider(providerCfg)
if err != nil {
log.Fatal("Cannot etcd provider: %v", err)
}

if err := kCheck.Load(provider, nil); err != nil {
log.Fatalf("error loading config: %v", err)
Expand Down Expand Up @@ -201,7 +210,10 @@ func main() {
Key: "child",
}

provider = etcd.Provider(providerCfg)
provider, err = etcd.Provider(providerCfg)
if err != nil {
log.Fatal("Cannot etcd provider: %v", err)
}

if err := kCheck.Load(provider, nil); err != nil {
log.Fatalf("error loading config: %v", err)
Expand Down Expand Up @@ -241,7 +253,10 @@ func main() {
Key: "child",
}

provider = etcd.Provider(providerCfg)
provider, err = etcd.Provider(providerCfg)
if err != nil {
log.Fatal("Cannot etcd provider: %v", err)
}

if err := kCheck.Load(provider, nil); err != nil {
log.Fatalf("error loading config: %v", err)
Expand Down

0 comments on commit b40e58a

Please sign in to comment.