How to set path for template html/template

Hello guys,
I try to connect my code to html view.
this is a way that I try to connect to html :

but I got this error :
panic: html/template: pattern matches no files: view/*.gohtml

goroutine 1 [running]:
/home/mehrdad/workspace/go/projects/src/mehrdaddolatkhah/cafekala_back/pkg/business/web/AuthWebHandler.go:26 +0x96
exit status 2

and this is my layout structure:
– business

may please guide me to fix this?

I see no http.HandleFunc in your code. Any clue from this?:

1 Like

slightly off topic

but w.Write([]byte(fmt.Sprintf("enter phone and password")))

looks complicated to me.

Why not just do
fmt.Fprint(w, "enter phone and password")

1 Like

thank you for your response,
because I call this function from the route section in my architecture. now, I don’t know how I must give a path for login.gohtml.

I shared the package structure in the first post on this topic