| Age | Commit message (Collapse) | Author |
|
With help of spdxconv tool [1], we able to bulk update all files license
and copyright format to comply with SPDX formats.
[1] https://kilabit.info/project/spdxconv/
|
|
The GoEmbed test that write Go embedded code into "internal/test/embed/"
may create unnecessary changes when the test run on new clone of this
repository, or when we run "go test" again on that package after rebasing.
|
|
The CommentHeader option allow user to define custom header to the Go
generated file.
The string value is not checked, whether it's a comment or not, it
will rendered as is.
|
|
This is to remove "embed_test" being displayed on the documentation page.
|
|
Since the GoEmbed can be called only when MemFS instance is initiated,
it would be better if parameters for GoEmbed also initialized in the
struct Options.
In this way any additional parameters needed to add to GoEmbed does not
changes the method signature in the future.
This commit add new type EmbedOptions that contains the parameters
for GoEmbed.
In this new type, we add new field EmbedWithoutModTime.
if its true, the modification time for all files and directories are not
stored inside generated code, instead all files will use the current
time when the program is running.
|
|
The variable memFS is exist only on test file, but if the file name
for generated GoEmbed is not _test.go the "go install /lib/memfs/..."
will thrown an error
go install ./...
# github.com/shuLhan/share/lib/memfs/embed_test
lib/memfs/embed_test/memfs_embed.go:20:31: undefined: memFS
lib/memfs/embed_test/memfs_embed.go:21:31: undefined: memFSR
|
|
Previously we use the "testdata" for output of Node.Save() test.
This is caused the modified time on "testdata" get changes every
time we run the test and cause the embed_test failed.
This changes use temporary directory and revert part of Node Save()
unit test from commit 792ba17ac1f.
|