cmd/run: Remove unused code
Go's encoding/json package parses all JSON numbers as float64 [1]. This
oddity was noticed when this code was first written [2], and was later
confirmed.
[1] https://pkg.go.dev/encoding/json#Unmarshal
[2] Commit cf5c58ab00
https://github.com/containers/podman/issues/6105
https://github.com/containers/toolbox/pull/1224
This commit is contained in:
parent
052666840a
commit
d932b039c8
1 changed files with 0 additions and 2 deletions
|
@ -546,8 +546,6 @@ func getEntryPointAndPID(container string) (string, int, error) {
|
|||
switch entryPointPID := entryPointPID.(type) {
|
||||
case float64:
|
||||
entryPointPIDInt = int(entryPointPID)
|
||||
case int:
|
||||
entryPointPIDInt = entryPointPID
|
||||
default:
|
||||
return "", 0, fmt.Errorf("failed to inspect entry point PID of container %s", container)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue