1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-11-24 08:22:25 +02:00

Fix a bug in example/fib/app.go line:69 (#2860)

* modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline"

* Add pull reqesut ID into CHANGELOG.md

* append "\n" to the string param of Fscanf() in getting-started.md

* delete a line in CHANGELOG.md.

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
minquan chen 2022-04-27 01:48:30 +08:00 committed by GitHub
parent fdfc821bac
commit d342bdefa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -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())

View File

@ -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())