t.Fatalf("Unable to create temporary file. %s",err)
t.Fatalf("Unable to create temporary file. %s",err)
}
}
deferos.Remove(tmpfile.Name())
deferos.Remove(tmpfile1.Name())
minioBinaryPath2:=tmpfile.Name()
fi,err:=tmpfile.Stat()
minioBinaryPath2:=tmpfile1.Name()
fi,err:=tmpfile1.Stat()
iferr!=nil{
iferr!=nil{
t.Fatalf("Unable to get temporary file info. %s",err)
t.Fatalf("Unable to get temporary file info. %s",err)
}
}
iferr=tmpfile.Close();err!=nil{
iferr=tmpfile1.Close();err!=nil{
t.Fatalf("Unable to create temporary file. %s",err)
t.Fatalf("Unable to create temporary file. %s",err)
}
}
releaseTime2:=fi.ModTime().UTC()
releaseTime2:=fi.ModTime().UTC()
errorMessage1:="Unable to get ModTime of . stat : no such file or directory"
minioBinaryPath3:="go"
ifruntime.GOOS=="windows"{
ifruntime.GOOS==globalWindowsOSName{
errorMessage1="Unable to get ModTime of . Lstat : The system cannot find the path specified."
minioBinaryPath3="go.exe"
}
goBinAbsPath,err:=exec.LookPath(minioBinaryPath3)
iferr!=nil{
t.Fatal(err)
}
fi,err=os.Stat(goBinAbsPath)
iferr!=nil{
t.Fatal(err)
}
}
releaseTime3:=fi.ModTime().UTC()
// Get a non-absolute binary path.
minioBinaryPath4:=filepath.Base(tmpfile1.Name())
errorMessage2:="Unable to get ModTime of non-existing-file. stat non-existing-file: no such file or directory"
// Get a non-existent absolute binary path
minioBinaryPath5:="/tmp/non-existent-file"
ifruntime.GOOS==globalWindowsOSName{
minioBinaryPath5="C:\\tmp\\non-existent-file"
}
errorMessage1:="exec: \"\": executable file not found in $PATH"
ifruntime.GOOS==globalWindowsOSName{
errorMessage1="exec: \"\": executable file not found in %PATH%"
}
errorMessage2:="exec: \"non-existent-file\": executable file not found in $PATH"
ifruntime.GOOS==globalWindowsOSName{
errorMessage2="exec: \"non-existent-file\": executable file not found in %PATH%"
}
errorMessage3:=fmt.Sprintf("exec: \"%s\": executable file not found in $PATH",minioBinaryPath4)
ifruntime.GOOS==globalWindowsOSName{
errorMessage3="exec: \""+minioBinaryPath4+"\": executable file not found in %PATH%"
}
errorMessage4:="Unable to get ModTime of /tmp/non-existent-file. stat /tmp/non-existent-file: no such file or directory"
ifruntime.GOOS=="windows"{
ifruntime.GOOS=="windows"{
errorMessage2="Unable to get ModTime of non-existing-file. GetFileAttributesEx non-existing-file: The system cannot find the file specified."
errorMessage4="Unable to get ModTime of C:\\tmp\\non-existent-file. GetFileAttributesEx C:\\tmp\\non-existent-file: The system cannot find the path specified."