Solving readers-writers problem in Go