Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 719 Bytes

README.md

File metadata and controls

26 lines (21 loc) · 719 Bytes

Gexec

Gexec originates from oklog where it was originally made and designed by Peter Bourgon. The library was extracted so that it can be used as an independent library without having to bring in more dependencies than required.

At some point additions have been made, but the core has remained the same.

Examples

For more detailed examples see

var g gexec.Group
{
    listener, := net.Listen("tcp", ":0")
    g.Add(func() error {
        return http.Serve(listener, http.NewServeMux())
    }, func(err error) {
        listener.Close()
    })
}
// Execute the group
fmt.Println(g.Run())