Skip to content

Commit

Permalink
Golang Getting started - based on roll dice service and Automatic Ins…
Browse files Browse the repository at this point in the history
…trumentation
  • Loading branch information
pegasas committed Sep 9, 2023
1 parent 1ea0f60 commit bea809c
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions content/en/docs/instrumentation/go/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@ directory[^1].
```go
package main

// Fibonacci returns the n-th Fibonacci number.
func Fibonacci(n uint) (uint64, error) {
if n <= 1 {
return uint64(n), nil
}
import (
"github.com/gin-gonic/gin"
"net/http"
)

var n2, n1 uint64 = 0, 1
for i := uint(2); i < n; i++ {
n2, n1 = n1, n1+n2
}
func main() {
r := gin.Default()

return n2 + n1, nil
r.GET("/", func(c *gin.Context) {
c.String(http.StatusOK, "hello world")
})

r.Run()
}
```

Expand Down

0 comments on commit bea809c

Please sign in to comment.