Documentation ¶
Overview ¶
Package snippet compare snippets in golang file.
Snippets lines without specific upcase/lower case of letters. Name of snippet is single word.
Format of snippet:
// Snippet Name some code // End Name
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ExpectSnippets = "./expect.snippets"
ExpectSnippets is location of expect snippets
View Source
var SuffixFiles = []string{".go"}
SuffixFiles store list of acceptable fileformat
Functions ¶
func Test ¶
func Test(t interface { Errorf(format string, args ...any) Logf(format string, args ...any) }, folder string)
Test and update snippets in all acceptable files in `folder` with subfolders. Location with expected snippets in file "ExpectSnippets"
for update snippets run in console: UPDATE=true go test or see package `compare`
Types ¶
Click to show internal directories.
Click to hide internal directories.