Merge pull request #377 from rhatdan/label

Docker needs to know whether the user requested a relabel
This commit is contained in:
Michael Crosby 2015-11-02 14:55:27 -08:00
commit 26eb6a1bcd
2 changed files with 10 additions and 0 deletions

View File

@ -65,6 +65,11 @@ func Validate(label string) error {
return nil return nil
} }
// RelabelNeeded checks whether the user requested a relabel
func RelabelNeeded(label string) bool {
return false
}
// IsShared checks that the label includes a "shared" mark // IsShared checks that the label includes a "shared" mark
func IsShared(label string) bool { func IsShared(label string) bool {
return false return false

View File

@ -181,6 +181,11 @@ func Validate(label string) error {
return nil return nil
} }
// RelabelNeeded checks whether the user requested a relabel
func RelabelNeeded(label string) bool {
return strings.Contains(label, "z") || strings.Contains(label, "Z")
}
// IsShared checks that the label includes a "shared" mark // IsShared checks that the label includes a "shared" mark
func IsShared(label string) bool { func IsShared(label string) bool {
return strings.Contains(label, "z") return strings.Contains(label, "z")