Reputation: 1
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