mirror of
https://github.com/containous/traefik.git
synced 2025-10-05 07:33:19 +03:00
Fix constraints and add doc
This commit is contained in:
@@ -139,6 +139,13 @@ func (c *Constraint) String() string {
|
||||
return c.Key + "!=" + c.Regex
|
||||
}
|
||||
|
||||
// UnmarshalText define how unmarshal in TOML parsing
|
||||
func (c *Constraint) UnmarshalText(text []byte) error {
|
||||
constraint, err := NewConstraint(string(text))
|
||||
*c = *constraint
|
||||
return err
|
||||
}
|
||||
|
||||
// MatchConstraintWithAtLeastOneTag tests a constraint for one single service
|
||||
func (c *Constraint) MatchConstraintWithAtLeastOneTag(tags []string) bool {
|
||||
for _, tag := range tags {
|
||||
|
Reference in New Issue
Block a user