api/server/router/container: containerRouter.postCommit: inline struct
Remove intermediate variable and inline the struct-literal. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
9613da63dc
commit
bf5ae17c16
1 changed files with 2 additions and 4 deletions
|
@ -53,16 +53,14 @@ func (s *containerRouter) postCommit(ctx context.Context, w http.ResponseWriter,
|
|||
return errdefs.InvalidParameter(err)
|
||||
}
|
||||
|
||||
commitCfg := &backend.CreateImageConfig{
|
||||
imgID, err := s.backend.CreateImageFromContainer(ctx, r.Form.Get("container"), &backend.CreateImageConfig{
|
||||
Pause: pause,
|
||||
Tag: ref,
|
||||
Author: r.Form.Get("author"),
|
||||
Comment: r.Form.Get("comment"),
|
||||
Config: config,
|
||||
Changes: r.Form["changes"],
|
||||
}
|
||||
|
||||
imgID, err := s.backend.CreateImageFromContainer(ctx, r.Form.Get("container"), commitCfg)
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue