forked from LaconicNetwork/kompose
Updated Vendoring
It resolves issues #474 and #589 which were coming from libcompose, as well as resolves #440 and #437 partially as `group_add` & `stop_grace_period` are supported by libcompose now.
This commit is contained in:
+16
@@ -3,6 +3,7 @@ package utils
|
||||
import (
|
||||
"encoding/json"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
|
||||
@@ -160,3 +161,18 @@ func ConvertKeysToStrings(item interface{}) interface{} {
|
||||
return item
|
||||
}
|
||||
}
|
||||
|
||||
// DurationStrToSecondsInt converts duration string to *int in seconds
|
||||
func DurationStrToSecondsInt(s string) *int {
|
||||
if s == "" {
|
||||
return nil
|
||||
}
|
||||
duration, err := time.ParseDuration(s)
|
||||
if err != nil {
|
||||
logrus.Errorf("Failed to parse duration:%v", s)
|
||||
return nil
|
||||
}
|
||||
r := (int)(duration.Seconds())
|
||||
return &r
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user