replace new() with initialize() (#490)

This commit is contained in:
Alessandro Ros
2023-12-26 12:48:35 +01:00
committed by GitHub
parent e77b281395
commit 2d0c530d97
37 changed files with 464 additions and 521 deletions

View File

@@ -9,11 +9,13 @@ import "log"
func main() {
// allocate the server.
s := newServer()
s := &server{}
s.initialize()
// allocate the client.
// give client access to the server.
newClient(s)
c := &client{s: s}
c.initialize()
// start server and wait until a fatal error
log.Printf("server is ready")