MM-27613: Update dependencies (#15294)
https://mattermost.atlassian.net/browse/MM-27613
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
54f86e7fb1
Коммит
f2a8e10216
12
vendor/github.com/hako/durafmt/durafmt.go
сгенерированный
поставляемый
12
vendor/github.com/hako/durafmt/durafmt.go
сгенерированный
поставляемый
@@ -17,9 +17,9 @@ var (
|
||||
|
||||
// Durafmt holds the parsed duration and the original input duration.
|
||||
type Durafmt struct {
|
||||
duration time.Duration
|
||||
input string // Used as reference.
|
||||
limitN int // Non-zero to limit only first N elements to output.
|
||||
duration time.Duration
|
||||
input string // Used as reference.
|
||||
limitN int // Non-zero to limit only first N elements to output.
|
||||
limitUnit string // Non-empty to limit max unit
|
||||
}
|
||||
|
||||
@@ -35,6 +35,10 @@ func (d *Durafmt) LimitFirstN(n int) *Durafmt {
|
||||
return d
|
||||
}
|
||||
|
||||
func (d *Durafmt) Duration() time.Duration {
|
||||
return d.duration
|
||||
}
|
||||
|
||||
// Parse creates a new *Durafmt struct, returns error if input is invalid.
|
||||
func Parse(dinput time.Duration) *Durafmt {
|
||||
input := dinput.String()
|
||||
@@ -95,7 +99,7 @@ func (d *Durafmt) String() string {
|
||||
var years int64
|
||||
var shouldConvert = false
|
||||
|
||||
remainingSecondsToConvert := int64(d.duration/time.Microsecond)
|
||||
remainingSecondsToConvert := int64(d.duration / time.Microsecond)
|
||||
|
||||
// Convert duration.
|
||||
if d.limitUnit == "" {
|
||||
|
||||
Ссылка в новой задаче
Block a user