improve autoencode feature for package gview

This commit is contained in:
John
2020-03-21 19:31:58 +08:00
parent c0a0913d4b
commit 16958413bb
9 changed files with 201 additions and 4 deletions

View File

@ -12,6 +12,12 @@ import (
// TestDataPath retrieves and returns the testdata path of current package.
// It is used for unit testing cases only.
func TestDataPath() string {
return CallerDirectory() + string(filepath.Separator) + "testdata"
// The parameter <names> specifies the underlying sub-folders/sub-files,
// which will be joined with current system separator.
func TestDataPath(names ...string) string {
path := CallerDirectory() + string(filepath.Separator) + "testdata"
for _, name := range names {
path += string(filepath.Separator) + name
}
return path
}