Başar Koç
Başar Koç

Reputation: 1

while main.go and "queries" folder are same directory, why am ı getting such error "File does not exist"?

When I give the name of the "queries" folder as a parameter to the ReadDir() function in main.go, it does not see the files in the queries folder and I get the error "file does not exist" when main.go and the queries folder are in the same directory. But when I place the queries folder in the goqueries folder in the pkg folder and call this ReadDir function in a function in the template.go file, and call this function in the main.go file under the main folder directory, I do not get any errors. It works.

i debugged but ı dont understand why getting error.

Upvotes: -4

Views: 54

Answers (0)

Related Questions