I don't think the current API provides that functionality. In the original proposal for signal.NotifyContext, there were several discussions, including related to what features the new API should provide. The consensus was that if a user wants to make a decision base on the signal caught, they should use "signal.Notify", as the low-level API, which allows that (refer to this issue https://github.com/golang/go/issues/37255).
On Thursday, May 13, 2021 at 10:54:39 PM UTC+2 [email protected] wrote: > Hi - i took a brief look and it doesn't look like we can access the > signal that was handled via the signal.NotifyContext() function call? > It could be useful for logging messages. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/b7b21dd2-b12a-4a01-b2f0-3dee10778cd1n%40googlegroups.com.
