Amine (a-hilaly) opened
Instead of storing cleaners in an array we can use maps the help identify and cancel/replace them in the other parts of git-bug code. See https://github.com/MichaelMure/git-bug/blob/master/util/interrupt/cleaner.go#L13
Amine (a-hilaly) opened
Instead of storing cleaners in an array we can use maps the help identify and cancel/replace them in the other parts of git-bug code. See https://github.com/MichaelMure/git-bug/blob/master/util/interrupt/cleaner.go#L13
Michael Muré (MichaelMure) commented
Be careful, cleaners should be executed in the reverse order that they have been defined, in a similar fashion as defer in go.
Amine (a-hilaly) commented
Good point, i didn't see that cleaner are appended in reverse order https://github.com/MichaelMure/git-bug/blob/master/util/interrupt/cleaner.go#L19
Michael Muré (MichaelMure) closed the bug