Vanadium is spread across multiple git repositories. The [contributor installation] process arranges these repositories as follows (some repositories omitted, for brevity):
Each repository has a
README.md file summarizing its purpose. The
repository contains the configuration that describes this repository
Things move around, so its best to examine your local installation for the latest arrangement.
Use gofmt and suggestions from Effective Go.
Vanadium interfaces are defined in the
tree in files named
model.go. For example, the file
security/model.go holds security interface
A test for package
foo should be in package
foo_test. This way, tests can
depend on anything they like without introducing cycles or affecting non-test
If a test must touch the internals of some package
foo, that test can be in
foo, but must keep its dependencies to a minimum, and must have a name
that ends with
Most tests should import the
and invoke its
Init function in order to configure
logging, random number generators etc. Doing so will assist in
debugging failing tests. For example:
-vmoduleflags can be used to control logging verbosity
- The seed of the random number generator is logged when running tests. This is useful when trying to reproduce failures that may not occur when the random number generator is seeded differently.
vdl tool uses VDL files to generate files containing RPC stub code for
VDL is not Go, but is modeled after Go, so VDL code should follow Go's style guidelines.
VDL files have a Go-like notion of packages. Go code
generated from a VDL file must appear in a location that respects both
the VDL file's package name and the value of
GOPATH. In a Go-based
project like Vanadium, the simplest way to accomplish this is to place
VDL source files into the
go/src tree at the location that the
generated Go should be placed.
We prefer Go programs over shell scripts for jobs traditionally given to shell scripts.
If you must write a shell script, follow the Google Shell Style Guide.