Skip to content

Commit

Permalink
append "\n" to the string param of Fscanf() in getting-started.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Frapschen committed Apr 25, 2022
1 parent 9ce4f60 commit 1687543
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website_docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 1687543

Please sign in to comment.