Hello,
I’m a beginner with Go and have the following problem.
The following function works fine if I leave it in the main.go file:
func GetCWD() string {
dir, _ := os.Getwd()
return dir
}
As soon as I move this to another file: recover/recover.go and import this into the main.go
the print function in the main.go : fmt.Println(recover.GetCWD) will show : 0x4a00f0
instead of the string ?
I have tried to use fmt.Printf("%s", recover.GetCWD)
but probably I miss something ?
Regards,
Niels