Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed typo
  • Loading branch information
wrr14001 committed Dec 7, 2018
1 parent 3b7e88d commit 245844d
Showing 1 changed file with 0 additions and 0 deletions.
Binary file modified README.md

Some thoughts to direct your initial planning --

  • structs are a great way to keep things together. If you're gonna have a loop that writes to a websocket and you need to manage a lock for that websocket, it might be a good idea to keep a websocket and a lock for it in a struct

  • this pattern is great for handling messages from multiple channels

    for {
        select {
        case data, ok := <-c:   // c and d are channels
        case data, ok := <-c:   // c and d are 
            # do something
        case data, ok := <-d:
            # do something
        }
    }
    
  • Make sure you lock before writing to a websocket so that you don't get a concurrent write error

  • If your server quits too early it might be because of waitgroups -- Make sure you actually wait for waitgroups and add goroutines you want to wait for to them.

  • Ask any questions you need to, my slack pm is always open and I'll try to help you out as soon as I can.

Binary file not shown.

0 comments on commit 245844d

Please sign in to comment.