Library that provides to break goroutine and wait it completion
Example:
package main
import (
"fmt"
"github.com/akramarenkov/breaker"
)
func main() {
brk := breaker.New()
go func() {
defer brk.Complete()
_, opened := <-brk.IsBreaked()
fmt.Println(opened)
}()
brk.Break()
fmt.Println(brk.IsStopped())
// Output:
// false
// true
}