ft: allow detect changes local images

This commit is contained in:
9bany 2023-09-06 10:00:45 +07:00
parent 36391b0ae7
commit 1f8e22ed91
4 changed files with 22 additions and 0 deletions

View file

@ -113,6 +113,22 @@ func (c Container) ImageName() string {
return imageName
}
// Local returns the value of the container local label and if the label
// was set.
func (c Container) LocalImage() (bool, bool) {
rawBool, ok := c.getLabelValue(enableLocal)
if !ok {
return false, false
}
parsedBool, err := strconv.ParseBool(rawBool)
if err != nil {
return false, false
}
return parsedBool, true
}
// Enabled returns the value of the container enabled label and if the label
// was set.
func (c Container) Enabled() (bool, bool) {