mirror of
https://github.com/containers/podman.git
synced 2025-07-03 01:08:02 +08:00
Merge pull request #25702 from Sianao/main
fix remove unnecessary err check
This commit is contained in:
@ -35,14 +35,11 @@ func PodCreate(w http.ResponseWriter, r *http.Request) {
|
|||||||
err error
|
err error
|
||||||
)
|
)
|
||||||
psg := specgen.PodSpecGenerator{InfraContainerSpec: &specgen.SpecGenerator{}}
|
psg := specgen.PodSpecGenerator{InfraContainerSpec: &specgen.SpecGenerator{}}
|
||||||
if err := json.NewDecoder(r.Body).Decode(&psg); err != nil {
|
if err = json.NewDecoder(r.Body).Decode(&psg); err != nil {
|
||||||
utils.Error(w, http.StatusInternalServerError, fmt.Errorf("%v: %w", failedToDecodeSpecgen, err))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if err != nil {
|
|
||||||
utils.Error(w, http.StatusInternalServerError, fmt.Errorf("%v: %w", failedToDecodeSpecgen, err))
|
utils.Error(w, http.StatusInternalServerError, fmt.Errorf("%v: %w", failedToDecodeSpecgen, err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !psg.NoInfra {
|
if !psg.NoInfra {
|
||||||
infraOptions := entities.NewInfraContainerCreateOptions() // options for pulling the image and FillOutSpec
|
infraOptions := entities.NewInfraContainerCreateOptions() // options for pulling the image and FillOutSpec
|
||||||
infraOptions.Net = &entities.NetOptions{}
|
infraOptions.Net = &entities.NetOptions{}
|
||||||
|
Reference in New Issue
Block a user