Fix signature issues, in-turn fixing mirror issues
This commit is contained in:
Generated
+6
-6
@@ -7,7 +7,7 @@
|
||||
"Deps": [
|
||||
{
|
||||
"ImportPath": "github.com/dustin/go-humanize",
|
||||
"Rev": "00897f070f09f194c26d65afae734ba4c32404e8"
|
||||
"Rev": "c128122e0b9b93799aef8181a537e5d8fd7081d6"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/fatih/color",
|
||||
@@ -29,13 +29,13 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/minio/minio-go",
|
||||
"Comment": "v0.2.0-12-g20db439",
|
||||
"Rev": "20db439bc6671562eeff32d4cc3381eb7e824671"
|
||||
"Comment": "v0.2.0-16-gd4b3d1e",
|
||||
"Rev": "d4b3d1ecfb717775481044e72cc10cc0d534dc0c"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/minio/minio/pkg/probe",
|
||||
"Comment": "release-1434511043-296-g7f13095",
|
||||
"Rev": "7f1309526056653a8e07277b3e39bfc49766363a"
|
||||
"Comment": "release-1434511043-300-g28d9565",
|
||||
"Rev": "28d9565400d68ae1cd79b81075823f10775e6230"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/minio/pb",
|
||||
@@ -56,7 +56,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "gopkg.in/check.v1",
|
||||
"Rev": "11d3bc7aa68e238947792f30573146a3231fc0f1"
|
||||
"Rev": "b3d3430320d4260e5fea99841af984b3badcea63"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ func humanateBigBytes(s, base *big.Int, sizes []string) string {
|
||||
//
|
||||
// BigBytes(82854982) -> 83MB
|
||||
func BigBytes(s *big.Int) string {
|
||||
sizes := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
|
||||
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}
|
||||
return humanateBigBytes(s, bigSIExp, sizes)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -86,8 +86,8 @@ func TestBigBytes(t *testing.T) {
|
||||
{"bytes(803)", bbyte(803), "803B"},
|
||||
{"bytes(999)", bbyte(999), "999B"},
|
||||
|
||||
{"bytes(1024)", bbyte(1024), "1.0KB"},
|
||||
{"bytes(1MB - 1)", bbyte(MByte - Byte), "1000KB"},
|
||||
{"bytes(1024)", bbyte(1024), "1.0kB"},
|
||||
{"bytes(1MB - 1)", bbyte(MByte - Byte), "1000kB"},
|
||||
|
||||
{"bytes(1MB)", bbyte(1024 * 1024), "1.0MB"},
|
||||
{"bytes(1GB - 1K)", bbyte(GByte - KByte), "1000MB"},
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ func humanateBytes(s uint64, base float64, sizes []string) string {
|
||||
//
|
||||
// Bytes(82854982) -> 83MB
|
||||
func Bytes(s uint64) string {
|
||||
sizes := []string{"B", "KB", "MB", "GB", "TB", "PB", "EB"}
|
||||
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"}
|
||||
return humanateBytes(s, 1000, sizes)
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -80,9 +80,9 @@ func TestBytes(t *testing.T) {
|
||||
{"bytes(803)", Bytes(803), "803B"},
|
||||
{"bytes(999)", Bytes(999), "999B"},
|
||||
|
||||
{"bytes(1024)", Bytes(1024), "1.0KB"},
|
||||
{"bytes(9999)", Bytes(9999), "10KB"},
|
||||
{"bytes(1MB - 1)", Bytes(MByte - Byte), "1000KB"},
|
||||
{"bytes(1024)", Bytes(1024), "1.0kB"},
|
||||
{"bytes(9999)", Bytes(9999), "10kB"},
|
||||
{"bytes(1MB - 1)", Bytes(MByte - Byte), "1000kB"},
|
||||
|
||||
{"bytes(1MB)", Bytes(1024 * 1024), "1.0MB"},
|
||||
{"bytes(1GB - 1K)", Bytes(GByte - KByte), "1000MB"},
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ func Comma(v int64) string {
|
||||
v = 0 - v
|
||||
}
|
||||
|
||||
parts := []string{"", "", "", "", "", "", "", ""}
|
||||
parts := []string{"", "", "", "", "", "", ""}
|
||||
j := len(parts) - 1
|
||||
|
||||
for v > 999 {
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ func urlEncodeName(name string) (string, error) {
|
||||
continue
|
||||
}
|
||||
switch s {
|
||||
case '-', '_', '.', '~', '/': // §2.3 Unreserved characters (mark)
|
||||
case '-', '_', '.', '~', '/', '+': // §2.3 Unreserved characters (mark)
|
||||
encodedName = encodedName + string(s)
|
||||
continue
|
||||
default:
|
||||
|
||||
+18
@@ -82,6 +82,23 @@ var ignoredHeaders = map[string]bool{
|
||||
"User-Agent": true,
|
||||
}
|
||||
|
||||
func path2BucketAndObject(path string) (bucketName, objectName string) {
|
||||
pathSplits := strings.SplitN(path, "?", 2)
|
||||
splits := strings.SplitN(pathSplits[0], separator, 3)
|
||||
switch len(splits) {
|
||||
case 0, 1:
|
||||
bucketName = ""
|
||||
objectName = ""
|
||||
case 2:
|
||||
bucketName = splits[1]
|
||||
objectName = ""
|
||||
case 3:
|
||||
bucketName = splits[1]
|
||||
objectName = splits[2]
|
||||
}
|
||||
return bucketName, objectName
|
||||
}
|
||||
|
||||
// path2Object gives objectName from URL path
|
||||
func path2Object(path string) (objectName string) {
|
||||
pathSplits := strings.SplitN(path, "?", 2)
|
||||
@@ -277,6 +294,7 @@ func (r *request) getCanonicalRequest(hashedPayload string) string {
|
||||
encodedPath, _ := urlEncodeName(r.req.URL.Path)
|
||||
// convert any space strings back to "+"
|
||||
encodedPath = strings.Replace(encodedPath, "+", "%20", -1)
|
||||
encodedPath = strings.Replace(encodedPath, "%2B", "+", -1)
|
||||
canonicalRequest := strings.Join([]string{
|
||||
r.req.Method,
|
||||
encodedPath,
|
||||
|
||||
+3
@@ -71,6 +71,9 @@ type Error struct {
|
||||
// trace the return path with Probe.Trace and finally handle reporting or quitting
|
||||
// at the top level.
|
||||
func New(e error) *Error {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
Err := Error{sync.RWMutex{}, e, GetSysInfo(), []tracePoint{}}
|
||||
return Err.trace()
|
||||
}
|
||||
|
||||
+1
-1
@@ -335,7 +335,7 @@ func (c *C) logPanic(skip int, value interface{}) {
|
||||
if name == "Value.call" && strings.HasSuffix(path, valueGo) {
|
||||
continue
|
||||
}
|
||||
if (name == "call16" || name == "call32") && strings.Contains(path, asmGo) {
|
||||
if name == "call16" && strings.Contains(path, asmGo) {
|
||||
continue
|
||||
}
|
||||
c.logf("%s:%d\n in %s", nicePath(file), line, name)
|
||||
|
||||
Reference in New Issue
Block a user