You've already forked go-profiler-notes
mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2025-07-15 23:54:16 +02:00
Initial work on new guide
This commit is contained in:
19
examples/guide/main3.go
Normal file
19
examples/guide/main3.go
Normal file
@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"runtime/trace"
|
||||
)
|
||||
|
||||
func main() {
|
||||
trace.Start(os.Stderr)
|
||||
defer trace.Stop()
|
||||
|
||||
res, err := http.Get("https://example.org/")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("%d\n", res.StatusCode)
|
||||
}
|
Reference in New Issue
Block a user