mirror of
https://github.com/spf13/viper
synced 2024-12-23 03:57:01 +00:00
14c9dc6a57
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
18 lines
245 B
Go
18 lines
245 B
Go
package testutil
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
)
|
|
|
|
// AbsFilePath calls filepath.Abs on path.
|
|
func AbsFilePath(t *testing.T, path string) string {
|
|
t.Helper()
|
|
|
|
s, err := filepath.Abs(path)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
|
|
return s
|
|
}
|