Compare commits
3 Commits
504a2369de
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 22dacb741f | |||
| 74bd8879b5 | |||
| b98f31c891 |
@@ -154,12 +154,12 @@ steps:
|
|||||||
- name: test
|
- name: test
|
||||||
image: golang
|
image: golang
|
||||||
commands:
|
commands:
|
||||||
- cd provider/definition
|
- cd definition
|
||||||
- go test ./...
|
- go test ./...
|
||||||
|
|
||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
image: golangci/golangci-lint:v1.55
|
image: golangci/golangci-lint:v1.55
|
||||||
commands:
|
commands:
|
||||||
- cd provider/definition
|
- cd definition
|
||||||
- golangci-lint run
|
- golangci-lint run
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ func ExampleClient_Watch() {
|
|||||||
err = watcher.Watch(ctx, func(ctx context.Context, oldVar, newVar config.Value) error {
|
err = watcher.Watch(ctx, func(ctx context.Context, oldVar, newVar config.Value) error {
|
||||||
fmt.Println("update example_enable old: ", oldVar.Bool(), " new:", newVar.Bool())
|
fmt.Println("update example_enable old: ", oldVar.Bool(), " new:", newVar.Bool())
|
||||||
wg.Done()
|
wg.Done()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}, "example_enable")
|
}, "example_enable")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -95,6 +96,7 @@ func ExampleClient_Watch() {
|
|||||||
err = watcher.Watch(ctx, func(ctx context.Context, oldVar, newVar config.Value) error {
|
err = watcher.Watch(ctx, func(ctx context.Context, oldVar, newVar config.Value) error {
|
||||||
fmt.Println("update example_db_dsn old: ", oldVar.String(), " new:", newVar.String())
|
fmt.Println("update example_db_dsn old: ", oldVar.String(), " new:", newVar.String())
|
||||||
wg.Done()
|
wg.Done()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}, "example_db_dsn")
|
}, "example_db_dsn")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
module gitoa.ru/go-4devs/config/definition
|
module gitoa.ru/go-4devs/config/definition
|
||||||
|
|
||||||
go 1.21.5
|
go 1.21
|
||||||
|
|
||||||
require github.com/iancoleman/strcase v0.3.0
|
require github.com/iancoleman/strcase v0.3.0
|
||||||
|
|||||||
Reference in New Issue
Block a user