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