Go program used for Delve

This commit is contained in:
Mihalis Tsoukalos 2019-03-07 17:35:27 +02:00
commit 98f8a77e8d

View file

@ -0,0 +1,26 @@
package main
import (
"fmt"
"os"
)
func function(i int) int {
return i * i
}
func main() {
if len(os.Args) == 1 {
fmt.Println("Need at least one argument.")
return
}
i := 5
fmt.Println("Debugging with Delve")
fmt.Println(i)
fmt.Println(function(i))
for arg, _ := range os.Args[1:] {
fmt.Println(arg)
}
}