diff --git a/templates/golang/main.go b/templates/golang/main.go index ce38057..fa45968 100644 --- a/templates/golang/main.go +++ b/templates/golang/main.go @@ -36,21 +36,21 @@ func main() { } - fmt.Println("Cleaning up opened channels for all nodes") - if err:=graph.CloseAllChannels(ctx, 0); err!=nil{ - fmt.Printf("Could not clean up node 0: %v\n", err) - os.Exit(1) - } + fmt.Println("Cleaning up opened channels for all nodes") + if err:=graph.CloseAllChannels(ctx, 0); err!=nil{ + fmt.Printf("Could not clean up node 0: %v\n", err) + os.Exit(1) + } - if err:=graph.CloseAllChannels(ctx, 1); err!=nil{ - fmt.Printf("Could not clean up node 1: %v\n", err) - os.Exit(1) - } + if err:=graph.CloseAllChannels(ctx, 1); err!=nil{ + fmt.Printf("Could not clean up node 1: %v\n", err) + os.Exit(1) + } - if err:=graph.CloseAllChannels(ctx, 2); err!=nil{ - fmt.Printf("Could not clean up node q: %v\n", err) - os.Exit(1) - } + if err:=graph.CloseAllChannels(ctx, 2); err!=nil{ + fmt.Printf("Could not clean up node q: %v\n", err) + os.Exit(1) + } fmt.Println("Waiting for threads to shutdown") cancel()