Is it ok to import the same folder several times? I do it like this becouse the files of my routes are in that folder and I add the identifier to know what route it is and then call the function.
inside my routes folder i have
All files in the same folder belong to the same package, so all 3 imports are the same anyway, therefore it is not necessary to to do 3 imports.
What about importing from a different folder?
I’m using wasm, and in Svelte want to access the same Go package from components that may be in different subfolders of the root where the Go/wasm is imported.
I’m not even sure this is a Go question!
The “same” go package can not be in different folders.
All files in a folder belong to the same package, different folders are different packages.
Imports should really have a full path
Relative paths should not be used as they don’t work very well.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.