You've already forked go-profiler-notes
mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2025-07-12 23:50:13 +02:00
25 lines
245 B
Go
25 lines
245 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
if err := run(); err != nil {
|
|
fmt.Fprintln(os.Stderr, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|
|
|
|
func run() error {
|
|
for i := 0; i < 10; i++ {
|
|
foo(i)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func foo(i int) int {
|
|
return i * 2
|
|
}
|