From d4dac4f849fe76d32b3bc874238c4751081f7e65 Mon Sep 17 00:00:00 2001 From: Sandertv Date: Wed, 27 Nov 2024 23:21:12 +0100 Subject: [PATCH] server/doc.go: Updated code block. --- server/doc.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/server/doc.go b/server/doc.go index 2ded568f4..fae665f03 100644 --- a/server/doc.go +++ b/server/doc.go @@ -4,11 +4,10 @@ // `Server.Listen()` may be called to start and run the server. It should be // followed up by a loop as such: // -// for srv.Accept(nil) { -// } +// for p := range srv.Accept() { +// // Use p +// } // // `Server.Accept()` blocks until a new player connects to the server and -// spawns in the default world, and calls the function passed to it once this -// happens. If `Server.Accept()` returns false, this means the server was -// closed. +// spawns in the default world. package server