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:
parent
fdfc821bac
commit
d342bdefa9
@ -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())
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user