...

Command testdata

Addmod adds a module as a txtar archive to the testdata/mod directory.

Usage:

go run addmod.go path@version...

It should only be used for very small modules - we do not want to check very large files into testdata/mod.

It is acceptable to edit the archive afterward to remove or shorten files. See mod/README for more information.

Savedir archives a directory tree as a txtar archive printed to standard output.

Usage:

go run savedir.go /path/to/dir >saved.txt

Typically the tree is later extracted during a test with tg.extract("testdata/saved.txt").