From 20cb60aad5075eb641374e7388266053e2fb9376 Mon Sep 17 00:00:00 2001 From: alingse Date: Wed, 10 Jan 2024 23:30:11 +0800 Subject: [PATCH 1/2] fix copyandpaste lint error --- .../service/jobs/register/tokenbucket/tokenbucket.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chapter/16/workflow/internal/service/jobs/register/tokenbucket/tokenbucket.go b/chapter/16/workflow/internal/service/jobs/register/tokenbucket/tokenbucket.go index b74de2e..e150e06 100644 --- a/chapter/16/workflow/internal/service/jobs/register/tokenbucket/tokenbucket.go +++ b/chapter/16/workflow/internal/service/jobs/register/tokenbucket/tokenbucket.go @@ -3,9 +3,12 @@ Package tokenbucket registers a job that is used to fetch a token from a token b Register name: "tokenBucket" Args: + "bucket"(mandatory): The name of the bucket "fatal"(mandatory): true if a failure should cause a fatal error, false if it should block until it gets one + Result: + If the site is not in decom, will return a fatal error. */ package tokenbucket @@ -59,7 +62,7 @@ func (a *args) validate(args map[string]string) error { case "true": a.fatal = true case "false": - a.fatal = true + a.fatal = false default: return fmt.Errorf("arg(fatal) was not true or false, was %q", v) } From 8084d53bc58564d972679b693630b98418ac6162 Mon Sep 17 00:00:00 2001 From: alingse Date: Wed, 10 Jan 2024 23:31:15 +0800 Subject: [PATCH 2/2] fix copyandpaste lint error --- chapter/8/rollout/lb/client/cli/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter/8/rollout/lb/client/cli/cli.go b/chapter/8/rollout/lb/client/cli/cli.go index f326bd1..4a98c95 100644 --- a/chapter/8/rollout/lb/client/cli/cli.go +++ b/chapter/8/rollout/lb/client/cli/cli.go @@ -75,7 +75,7 @@ func main() { Port: int32(*port), URLPath: *urlPath, } - if err := c.AddBackend(ctx, *pattern, b); err != nil { + if err := c.RemoveBackend(ctx, *pattern, b); err != nil { panic(err) } case "poolHealth":