Skip to content

Commit fd321e2

Browse files
committed
modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline"
1 parent 68d538a commit fd321e2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
2323
- Delegated instruments are unwrapped before delegating Callbacks. (#2784)
2424
- Resolve supply-chain failure for the markdown-link-checker GitHub action by calling the CLI directly. (#2834)
2525
- Remove import of `testing` package in non-tests builds. (#2786)
26+
- modify the Fscanf function param in example/fib/app.go line:69 to avoid process break by "unexpected newline"
2627

2728
### Changed
2829

example/fib/app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (a *App) Poll(ctx context.Context) (uint, error) {
6666
a.l.Print("What Fibonacci number would you like to know: ")
6767

6868
var n uint
69-
_, err := fmt.Fscanf(a.r, "%d", &n)
69+
_, err := fmt.Fscanf(a.r, "%d\n", &n)
7070
if err != nil {
7171
span.RecordError(err)
7272
span.SetStatus(codes.Error, err.Error())

0 commit comments

Comments
 (0)