[Solved] How to access another file in GO

to use a function from another package, you need to export it (GetUserDetails) as said here An identifier may be exported to permit access to it from another package func GetUserDetails(w http.ResponseWriter, r *http.Request) { fmt.Println(“here”) message := “Hello World” w.Write([]byte(message)) } solved How to access another file in GO