Upgrade k8s package verison (#5358)
* upgrade k8s package version Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> * Script upgrade and code formatting. Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io> Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
This commit is contained in:
8
vendor/k8s.io/apimachinery/pkg/util/duration/duration.go
generated
vendored
8
vendor/k8s.io/apimachinery/pkg/util/duration/duration.go
generated
vendored
@@ -27,9 +27,9 @@ func ShortHumanDuration(d time.Duration) string {
|
||||
// Allow deviation no more than 2 seconds(excluded) to tolerate machine time
|
||||
// inconsistence, it can be considered as almost now.
|
||||
if seconds := int(d.Seconds()); seconds < -1 {
|
||||
return fmt.Sprintf("<invalid>")
|
||||
return "<invalid>"
|
||||
} else if seconds < 0 {
|
||||
return fmt.Sprintf("0s")
|
||||
return "0s"
|
||||
} else if seconds < 60 {
|
||||
return fmt.Sprintf("%ds", seconds)
|
||||
} else if minutes := int(d.Minutes()); minutes < 60 {
|
||||
@@ -49,9 +49,9 @@ func HumanDuration(d time.Duration) string {
|
||||
// Allow deviation no more than 2 seconds(excluded) to tolerate machine time
|
||||
// inconsistence, it can be considered as almost now.
|
||||
if seconds := int(d.Seconds()); seconds < -1 {
|
||||
return fmt.Sprintf("<invalid>")
|
||||
return "<invalid>"
|
||||
} else if seconds < 0 {
|
||||
return fmt.Sprintf("0s")
|
||||
return "0s"
|
||||
} else if seconds < 60*2 {
|
||||
return fmt.Sprintf("%ds", seconds)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user