Skip to content

Instantly share code, notes, and snippets.

@davesnowdon
Created September 22, 2022 20:28
Show Gist options
  • Save davesnowdon/0e9ba9f151b1482a5cbac3c525d1d625 to your computer and use it in GitHub Desktop.
Save davesnowdon/0e9ba9f151b1482a5cbac3c525d1d625 to your computer and use it in GitHub Desktop.
port := 50051 // we'll implement command line arguments leter
lis, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", *port))
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment