Documentation
¶
Index ¶
- func CheckComment(wantComment, got string) error
- func FindFile(ar *txtar.Archive, filename string) (*txtar.File, error)
- func ReadTxtarFS(filename string) (fs.FS, error)
- func TxtarArchiveToFS(ar *txtar.Archive) (fs.FS, error)
- func VerifyImports(t *testing.T, allowed ...string)
- func WriteTxtar(filename string, files []txtar.File, comment string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckComment ¶
CheckComment checks the validity of a txtar comment. It checks that the "got" comment is the same as would be generated by WriteTxtar(..., wantComment), but allows any copyright year.
For testing.
func FindFile ¶
FindFile returns the first "file" with the given filename in the txtar archive, or an error if none is found.
Intended for testing.
func VerifyImports ¶
VerifyImports verifies that a package only imports from allowed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.