fix: 避免make mod时异常

This commit is contained in:
ioito
2019-09-17 12:28:40 +08:00
parent 35012845ed
commit adba926545
5 changed files with 32 additions and 22 deletions
+3 -3
View File
@@ -151,10 +151,10 @@ require (
sigs.k8s.io/yaml v1.1.0 // indirect
yunion.io/x/jsonutils v0.0.0-20190625054549-a964e1e8a051
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224
yunion.io/x/s3cli v0.0.0-20190829081311-29d39b4e88bd
yunion.io/x/pkg v0.0.0-20190902093114-59ba154a6861
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/sqlchemy v0.0.0-20190823062008-bb710661356f
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3
)
replace github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190918140512-6eff6e97c193d7876334bf24f19ce0d1ed86d73a
replace github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859
+6 -14
View File
@@ -90,8 +90,6 @@ github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2 h1:1B/+1BcRhOMG1KH/Y
github.com/bradfitz/iter v0.0.0-20140124041915-454541ec3da2/go.mod h1:PyRFw1Lt2wKX4ZVSQ2mk+PeDa1rxyObEDlApuIsUKuo=
github.com/c-bata/go-prompt v0.2.1 h1:HTPxmnfY4y5x3Myo7Gq4ce989jfnvZIBgdBp6y8bjYM=
github.com/c-bata/go-prompt v0.2.1/go.mod h1:VzqtzE2ksDBcdln8G7mk2RX9QyGjH+OVqOCSiVIqS34=
github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 h1:m3fyIqe28zGggNHc9hE2R3Zk/CJC3Lg8KFSNfXu8mpk=
github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94/go.mod h1:DhWkbjUxN0QRc0xQvpI9QhzqQSzYysRuZVcqSfiStds=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/coredns/coredns v1.3.0 h1:Ubjr8ZrOpEj95/A9dqQqQAG2k5DWEFdg2ZB3tUXuULA=
github.com/coredns/coredns v1.3.0/go.mod h1:zASH/MVDgR6XZTbxvOnsZfffS+31vg6Ackf/wo1+AM0=
@@ -444,14 +442,8 @@ github.com/willf/bloom v2.0.3+incompatible h1:QDacWdqcAUI1MPOwIQZRy9kOR7yxfyEmxX
github.com/willf/bloom v2.0.3+incompatible/go.mod h1:MmAltL9pDMNTrvUkxdg0k0q5I0suxmuwp3KbyrZLOZ8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/yunionio/go-ceph v0.0.0-20190912140512-74fcb7c02a h1:qFmRm0Pm0HbCSwRfD8F24oEsTk9Mm/DveixxLIz+1Ho=
github.com/yunionio/go-ceph v0.0.0-20190912140512-74fcb7c02a/go.mod h1:8XuBae5AzsgotLArJSewMruYVaQs8AlfsK5jBCG8T9Y=
github.com/yunionio/go-ceph v0.0.0-20190912140512-c51b8478c h1:/9QrgZBxNyq1HsJk5jA2NXQxWoxaSc9v2DJVOlavEq4=
github.com/yunionio/go-ceph v0.0.0-20190912140512-c51b8478c/go.mod h1:8XuBae5AzsgotLArJSewMruYVaQs8AlfsK5jBCG8T9Y=
github.com/yunionio/go-ceph v0.0.0-20190912140512-ccc6576c3fe2ef6de74aa1473b9401d95c7cd7c1 h1:TURJ5mfG3+iRJBDDNLl+gy9CDpIQlgDlvAbzF1+WwVo=
github.com/yunionio/go-ceph v0.0.0-20190912140512-ccc6576c3fe2ef6de74aa1473b9401d95c7cd7c1/go.mod h1:8XuBae5AzsgotLArJSewMruYVaQs8AlfsK5jBCG8T9Y=
github.com/yunionio/go-ceph v0.0.0-20190918140512-6eff6e97c193d7876334bf24f19ce0d1ed86d73a h1:o6a7Gq95XxgizBdZ4GYUOOGtA8b7qrOQvPd5DhxggNo=
github.com/yunionio/go-ceph v0.0.0-20190918140512-6eff6e97c193d7876334bf24f19ce0d1ed86d73a/go.mod h1:8XuBae5AzsgotLArJSewMruYVaQs8AlfsK5jBCG8T9Y=
github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859 h1:wu596gn6sV3j5wy+GDfiG8nwtzIDpalJihfmC/TjoYc=
github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859/go.mod h1:8XuBae5AzsgotLArJSewMruYVaQs8AlfsK5jBCG8T9Y=
go.etcd.io/bbolt v1.3.3 h1:MUGmc65QhB3pIlaQ5bB4LwqSj6GIonVJXpZiaKNyaKk=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v3.3.10+incompatible h1:qXVcIR1kU3CYLD8zXDseOmBNwg0uaui53e4Wg4uj0rk=
@@ -591,10 +583,10 @@ yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d h1:59zrDL7Ft+hDukguJRmLr/Gdu/
yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d/go.mod h1:LC6f/4FozL0iaAbnFt2eDX9jlsyo3WiOUPm03d7+U4U=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf h1:OsKC+2ghZHwp+Ztm/MwKlLKKRiE7QcPG8eTp0GmsHbg=
yunion.io/x/pkg v0.0.0-20190620104149-945c25821dbf/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224 h1:dAeUov/CtKcPaOapGVG7+NRqmUF2fr2O3Onb+ID5HS4=
yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190829081311-29d39b4e88bd h1:pwGQ4JDXhuRNjmYI8hQXCs08wppsEgj9+u2udTJJDEo=
yunion.io/x/s3cli v0.0.0-20190829081311-29d39b4e88bd/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/pkg v0.0.0-20190902093114-59ba154a6861 h1:4TDb45M/HGZ3fWvts253g+U3Rb80jgEiNf8R8Ex7HjQ=
yunion.io/x/pkg v0.0.0-20190902093114-59ba154a6861/go.mod h1:t6rEGG2sQ4J7DhFxSZVOTjNd0YO/KlfWQyK1W4tog+E=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e h1:v+EzIadodSwkdZ/7bremd7J8J50Cise/HCylsOJngmo=
yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e/go.mod h1:0iFKpOs1y4lbCxeOmq3Xx/0AcQoewVPwj62eRluioEo=
yunion.io/x/sqlchemy v0.0.0-20190823062008-bb710661356f h1:maHGG78d6vLAyT/lGSOOsXWrylBfjdu+NMCGXFhLuhA=
yunion.io/x/sqlchemy v0.0.0-20190823062008-bb710661356f/go.mod h1:FTdwPdGhMgh4E+UFXc9klI1Ok34fMuybTT+jLhOaIjI=
yunion.io/x/structarg v0.0.0-20190809075558-115bed041de3 h1:bfC8EhXYvyGYldRWlzxiCM39Zfj3s3+zham9mW2h2LE=
+3 -3
View File
@@ -152,7 +152,7 @@ github.com/boombuler/barcode/utils
github.com/bradfitz/iter
# github.com/c-bata/go-prompt v0.2.1
github.com/c-bata/go-prompt
# github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190918140512-6eff6e97c193d7876334bf24f19ce0d1ed86d73a
# github.com/ceph/go-ceph v0.0.0-20181217221554-e32f9f0f2e94 => github.com/yunionio/go-ceph v0.0.0-20190912101231-6f05a06b3859
github.com/ceph/go-ceph/rados
github.com/ceph/go-ceph/rbd
# github.com/coredns/coredns v1.3.0
@@ -768,7 +768,7 @@ yunion.io/x/jsonutils
# yunion.io/x/log v0.0.0-20190629062853-9f6483a7103d
yunion.io/x/log
yunion.io/x/log/hooks
# yunion.io/x/pkg v0.0.0-20190726033806-b564cfdcc224
# yunion.io/x/pkg v0.0.0-20190902093114-59ba154a6861
yunion.io/x/pkg/util/version
yunion.io/x/pkg/utils
yunion.io/x/pkg/util/regutils
@@ -798,7 +798,7 @@ yunion.io/x/pkg/util/prometheus
yunion.io/x/pkg/prettytable
yunion.io/x/pkg/util/runtime
yunion.io/x/pkg/util/clock
# yunion.io/x/s3cli v0.0.0-20190829081311-29d39b4e88bd
# yunion.io/x/s3cli v0.0.0-20190917004522-13ac36d8687e
yunion.io/x/s3cli
# yunion.io/x/sqlchemy v0.0.0-20190823062008-bb710661356f
yunion.io/x/sqlchemy
+19 -1
View File
@@ -18,6 +18,7 @@ import (
"encoding/json"
"fmt"
"runtime"
"strings"
)
// Info contains versioning information.
@@ -65,7 +66,24 @@ func GetJsonString() string {
return string(bs)
}
func shortDate(dateStr string) string {
var buf strings.Builder
for _, c := range dateStr {
if c >= '0' && c <= '9' {
buf.WriteRune(c)
}
}
dateStr = buf.String()
if strings.HasPrefix(dateStr, "20") {
dateStr = dateStr[2:]
}
if len(dateStr) > 8 {
dateStr = dateStr[:8]
}
return dateStr
}
func GetShortString() string {
v := Get()
return fmt.Sprintf("%s(%s)", v.GitBranch, v.GitCommit)
return fmt.Sprintf("%s(%s%s)", v.GitBranch, v.GitCommit, shortDate(v.BuildDate))
}
+1 -1
View File
@@ -828,7 +828,7 @@ func (c Client) newRequest(method string, metadata requestMetadata) (req *http.R
case signerType.IsV2():
// Add signature version '2' authorization header.
req = s3signer.SignV2(*req, accessKeyID, secretAccessKey, isVirtualHost)
case metadata.objectName != "" && method == "PUT" && metadata.customHeader.Get("X-Amz-Copy-Source") == "" && !c.secure:
case metadata.objectName != "" && method == "PUT" && metadata.customHeader.Get("X-Amz-Copy-Source") == "" && !c.secure && metadata.contentLength != 0:
// Streaming signature is used by default for a PUT object request. Additionally we also
// look if the initialized client is secure, if yes then we don't need to perform
// streaming signature.