#How to import one "sub module" into another?

1 messages · Page 1 of 1 (latest)

smoky knot
#

I'm not really sure about the terminology. I come from Go, where you define each module with "package <module_name>", and to import it in another module, you just use the path basically. I have the following setup:

├── app
├── config
│   └── config.gleam
├── db
│   └── db.gleam
└── main.gleam

I want to import the config module into db, if possible. Haven't been able to figure out how, and Copilot just keeps suggesting nonsense.

grizzled basin
#

Module names are based on their filepath relative to src/

#

so import config/config etc

#

(This might make you rethink this particular folder structure)