lus/dgc

middleware doesnt check flags anymore

Opened this issue · 1 comments

With the new middleware implementation, every middleware is always executed. Now I have to check for labels by myself. Also the labels object is not used in your code at all :(

I personally liked the old implementation a lot more, than this new one.

Code i use, to check the Label:

execute := false
for _, flag := range ctx.Command.Flags {
	if flag == "params" {
		execute = true
	}
}

if !execute {
	following(ctx)
	return
}
lus commented

Hey^^

Yeah, that's currently the only way to check for flags. I will think about a better solution.