dlv调试时访问不可达函数报错please use a line with a statement
package main
import (
"fmt"
"time"
)
func test() {
fmt.Println("")
}
func main() {
time.Sleep(1000 * time.Second)
}
go build -gcflags=all="-N -l" -o test test.go
package main
import (
"fmt"
"time"
)
func test() {
fmt.Println("")
}
func main() {
time.Sleep(1000 * time.Second)
}
go build -gcflags=all="-N -l" -o test test.go