mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
improve function gdebug.TestDataPath and update all usage codes
This commit is contained in:
@ -10,10 +10,10 @@ import (
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// TestDataPath retrieves and returns the testdata path of current package.
|
||||
// It is used for unit testing cases only.
|
||||
// The parameter <names> specifies the underlying sub-folders/sub-files,
|
||||
// which will be joined with current system separator.
|
||||
// TestDataPath retrieves and returns the testdata path of current package,
|
||||
// which is used for unit testing cases only.
|
||||
// The parameter <names> specifies the its sub-folders/sub-files,
|
||||
// which will be joined with current system separator and returned with the path.
|
||||
func TestDataPath(names ...string) string {
|
||||
path := CallerDirectory() + string(filepath.Separator) + "testdata"
|
||||
for _, name := range names {
|
||||
|
||||
Reference in New Issue
Block a user