I'd recommend looking into the log package. https://golang.org/pkg/log/
package main
import (
"log"
)
func main() {
log.SetFlags(log.Lshortfile)
log.Println("Hello world") // main.go:9: Hello world
}
There are various fmt.Println statements in my golang project which I run through Idea IntelliJ version 2016.3. Is there any way I navigate to the code from console's printed statements? I want know what code is printing the line [rinted on console.