Use const slashSeparator instead of "/" everywhere (#8028)

This commit is contained in:
Harshavardhana
2019-08-06 12:08:58 -07:00
committed by GitHub
parent b52b90412b
commit e6d8e272ce
71 changed files with 298 additions and 293 deletions
+3 -3
View File
@@ -69,7 +69,7 @@ func TestIsValidVolname(t *testing.T) {
// cases for which test should fail.
// passing invalid bucket names.
{"", false},
{"/", false},
{SlashSeparator, false},
{"a", false},
{"ab", false},
{"ab/", true},
@@ -319,9 +319,9 @@ func TestPosixReadAll(t *testing.T) {
// TestPosixNewPosix all the cases handled in posix storage layer initialization.
func TestPosixNewPosix(t *testing.T) {
// Temporary dir name.
tmpDirName := globalTestTmpDir + "/" + "minio-" + nextSuffix()
tmpDirName := globalTestTmpDir + SlashSeparator + "minio-" + nextSuffix()
// Temporary file name.
tmpFileName := globalTestTmpDir + "/" + "minio-" + nextSuffix()
tmpFileName := globalTestTmpDir + SlashSeparator + "minio-" + nextSuffix()
f, _ := os.Create(tmpFileName)
f.Close()
defer os.Remove(tmpFileName)