mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-21 08:59:47 +01:00
check release
This commit is contained in:
@@ -43,7 +43,7 @@ func FromDocker(c *types.Container, dockerHost string) (res Container) {
|
||||
StopMethod: res.getDeleteLabel(LabelStopMethod),
|
||||
StopTimeout: res.getDeleteLabel(LabelStopTimeout),
|
||||
StopSignal: res.getDeleteLabel(LabelStopSignal),
|
||||
Running: c.Status == "running",
|
||||
Running: c.Status == "running" || c.State == "running",
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -94,7 +94,7 @@ func (c Container) getName() string {
|
||||
|
||||
func (c Container) getImageName() string {
|
||||
colonSep := strings.Split(c.Image, ":")
|
||||
slashSep := strings.Split(colonSep[len(colonSep)-1], "/")
|
||||
slashSep := strings.Split(colonSep[0], "/")
|
||||
return slashSep[len(slashSep)-1]
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ type Label struct {
|
||||
// Returns:
|
||||
// - error: an error if the field does not exist.
|
||||
func ApplyLabel[T any](obj *T, l *Label) E.NestedError {
|
||||
return U.SetFieldFromSnake(obj, l.Attribute, l.Value)
|
||||
return U.Deserialize(map[string]any{l.Attribute: l.Value}, obj)
|
||||
}
|
||||
|
||||
type ValueParser func(string) (any, E.NestedError)
|
||||
|
||||
Reference in New Issue
Block a user