mirror of
https://github.com/containers/podman.git
synced 2025-06-17 15:08:08 +08:00
Refactor Pod to use a Config struct
This allows us to JSON it and stuff it in the DB - previously, all pod fields were private, so JSON couldn't encode them. This allows us to keep all pod fields private by having a substruct with public fields. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #184 Approved by: baude
This commit is contained in:
@ -764,7 +764,7 @@ func (s *SQLState) AddPod(pod *Pod) (err error) {
|
||||
return ErrPodRemoved
|
||||
}
|
||||
|
||||
labelsJSON, err := json.Marshal(pod.labels)
|
||||
labelsJSON, err := json.Marshal(pod.config.Labels)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "error marshaling pod %s labels to JSON", pod.ID())
|
||||
}
|
||||
|
Reference in New Issue
Block a user