From c4f8979f48441bc51588f78281ae00b3b731d9ac Mon Sep 17 00:00:00 2001 From: postmannen Date: Wed, 20 Apr 2022 19:18:16 +0200 Subject: [PATCH] updated comments --- requests.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/requests.go b/requests.go index 88cd0a7..9928b35 100644 --- a/requests.go +++ b/requests.go @@ -1990,6 +1990,10 @@ func (m methodREQPublicKey) handler(proc process, message Message, node string) outCh := make(chan []byte) go func() { + // Normally we would do some logic here, where the result is passed to outCh when done, + // so we can split up the working logic, and f.ex. sending a reply logic. + // In this case this go func and the below select is not needed, but keeping it so the + // structure is the same as the other handlers. select { case <-ctx.Done(): case outCh <- proc.signatures.SignPublicKey: @@ -2040,7 +2044,8 @@ func (m methodREQPublicKeysGet) handler(proc process, message Message, node stri outCh := make(chan []byte) go func() { - // Normally we would do some logic here, where the result is passed to outCh when done. + // Normally we would do some logic here, where the result is passed to outCh when done, + // so we can split up the working logic, and f.ex. sending a reply logic. // In this case this go func and the below select is not needed, but keeping it so the // structure is the same as the other handlers. select { @@ -2097,7 +2102,8 @@ func (m methodREQPublicKeysToNode) handler(proc process, message Message, node s outCh := make(chan []byte) go func() { - // Normally we would do some logic here, where the result is passed to outCh when done. + // Normally we would do some logic here, where the result is passed to outCh when done, + // so we can split up the working logic, and f.ex. sending a reply logic. // In this case this go func and the below select is not needed, but keeping it so the // structure is the same as the other handlers. select { @@ -2159,7 +2165,8 @@ func (m methodREQPublicKeysAllow) handler(proc process, message Message, node st outCh := make(chan []byte) go func() { - // Normally we would do some logic here, where the result is passed to outCh when done. + // Normally we would do some logic here, where the result is passed to outCh when done, + // so we can split up the working logic, and f.ex. sending a reply logic. // In this case this go func and the below select is not needed, but keeping it so the // structure is the same as the other handlers. select {