Hello guys,
I try to open an HTML document for the login page. when trying with this section I got this error :
func Index(response http.ResponseWriter, request *http.Request) {
tmp, err := template.ParseFiles("github.com/mehrdaddolatkhah/rastebazaar/pkg/web/templates/admin/index.html")
if err != nil {
panic(err)
}
tmp.Execute(response, nil)
}
I got os.PathError
and the HTML document is under this path:
– root path project
/pkg/web/templates/admin/login.html
I think this problem is for the path that I gave to template.ParseFiles. but I don’t know how I must give the correct path to ParseFiles. may please guide me. thank you