From fd321e216ea8bb13f5b430f8f58e131f91ae23a2 Mon Sep 17 00:00:00 2001 From: fraps Date: Mon, 25 Apr 2022 18:09:14 +0800 Subject: [PATCH 1/4] modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline" --- CHANGELOG.md | 1 + example/fib/app.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16f3f0d0f37..9e594db2d8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Delegated instruments are unwrapped before delegating Callbacks. (#2784) - Resolve supply-chain failure for the markdown-link-checker GitHub action by calling the CLI directly. (#2834) - Remove import of `testing` package in non-tests builds. (#2786) +- modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline" ### Changed diff --git a/example/fib/app.go b/example/fib/app.go index 907779e613a..a92074258fb 100644 --- a/example/fib/app.go +++ b/example/fib/app.go @@ -66,7 +66,7 @@ func (a *App) Poll(ctx context.Context) (uint, error) { a.l.Print("What Fibonacci number would you like to know: ") var n uint - _, err := fmt.Fscanf(a.r, "%d", &n) + _, err := fmt.Fscanf(a.r, "%d\n", &n) if err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) From 9ce4f600a26ec6f3b54c49601a5823ded5169182 Mon Sep 17 00:00:00 2001 From: fraps Date: Mon, 25 Apr 2022 20:20:37 +0800 Subject: [PATCH 2/4] Add pull reqesut ID into CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e594db2d8f..15743262ece 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Delegated instruments are unwrapped before delegating Callbacks. (#2784) - Resolve supply-chain failure for the markdown-link-checker GitHub action by calling the CLI directly. (#2834) - Remove import of `testing` package in non-tests builds. (#2786) -- modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline" +- modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline". (#2860) ### Changed From 1687543b330684e214a946895a342a694fe41c19 Mon Sep 17 00:00:00 2001 From: fraps Date: Mon, 25 Apr 2022 21:32:59 +0800 Subject: [PATCH 3/4] append "\n" to the string param of Fscanf() in getting-started.md --- website_docs/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website_docs/getting-started.md b/website_docs/getting-started.md index 4262cd6ff83..5fdf2418187 100644 --- a/website_docs/getting-started.md +++ b/website_docs/getting-started.md @@ -214,7 +214,7 @@ func (a *App) Poll(ctx context.Context) (uint, error) { a.l.Print("What Fibonacci number would you like to know: ") var n uint - _, err := fmt.Fscanf(a.r, "%d", &n) + _, err := fmt.Fscanf(a.r, "%d\n", &n) // Store n as a string to not overflow an int64. nStr := strconv.FormatUint(uint64(n), 10) @@ -458,7 +458,7 @@ func (a *App) Poll(ctx context.Context) (uint, error) { a.l.Print("What Fibonacci number would you like to know: ") var n uint - _, err := fmt.Fscanf(a.r, "%d", &n) + _, err := fmt.Fscanf(a.r, "%d\n", &n) if err != nil { span.RecordError(err) span.SetStatus(codes.Error, err.Error()) From 809153c715e5a7722a2193377d18c0b437b9a3ee Mon Sep 17 00:00:00 2001 From: fraps Date: Tue, 26 Apr 2022 07:44:13 +0800 Subject: [PATCH 4/4] delete a line in CHANGELOG.md. --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15743262ece..16f3f0d0f37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Delegated instruments are unwrapped before delegating Callbacks. (#2784) - Resolve supply-chain failure for the markdown-link-checker GitHub action by calling the CLI directly. (#2834) - Remove import of `testing` package in non-tests builds. (#2786) -- modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline". (#2860) ### Changed