feat: toggle on segment alias

This commit is contained in:
Jan De Dobbeleer 2023-02-17 12:50:02 +01:00 committed by Jan De Dobbeleer
parent bb15f078bb
commit 3979bff7f9

View file

@ -462,7 +462,7 @@ func (segment *Segment) SetEnabled(env platform.Environment) {
if toggles, OK := segment.env.Cache().Get(platform.TOGGLECACHE); OK && len(toggles) > 0 {
list := strings.Split(toggles, ",")
for _, toggle := range list {
if SegmentType(toggle) == segment.Type {
if SegmentType(toggle) == segment.Type || toggle == segment.Alias {
return
}
}