CUE modules have a specific set of files and directories that make up the layout.
hof will look for this directory and file,
by walking up the directory tree until it finds them.
cue.mod directory has a few important subdirectories
module.cue file is how
cue knows the current module name
hof records dependencies.
A CUE module is a collection of packages. These are similar to Go packages, and if you use them the same, then they will behave the same. However, CUE modules have several extensions. We recommend sticking to the Go style packages and imports, as this style is much easier for non-experts to understand. If you want to learn about the other variations, check out our page on cuetorials.com - modules & packages.
The Go style of packages and imports:
- use lowercase and underscores
- have only one package per directory
- name should be the same as the directory
<module-path>/<package-path>for all imports
For example, in the
we have imports like: