As an alternative should the docs be updated to use the syscall package
signals directly?
https://godoc.org/os/signal#Notify

Feels mildly strange intermixing vars from os and syscall where each has
it's own distinct convention for the signal names.

The two signals found in os follow the standard Go convention for variable
names (e.g. Interrupt). Whereas the syscall package uses a convention more
akin to C (e.g. SIGINT) presumably a result of auto-generation or legacy.

On Tue, 16 Apr 2019 at 23:36, Nathan Fisher <nfis...@junctionbox.ca> wrote:

> Hello,
>
> Currently the *os* package defines the following signals:
>
> var (
>     Interrupt Signal <https://godoc.org/os#Signal> = syscall 
> <https://godoc.org/syscall>.SIGINT <https://godoc.org/syscall#SIGINT>
>     Kill      Signal <https://godoc.org/os#Signal> = syscall 
> <https://godoc.org/syscall>.SIGKILL <https://godoc.org/syscall#SIGKILL>
> )
>
> Would it make sense to include a Term signal as well or were these signals
> considered historical accidents?
>
> My argument for including Term/SIGTERM is that it's used to notify pods of
> imminent shutdown in kubernetes.
>
> While it's simple enough to add a var to my app it feels unnecessary for
> something that seems an increasingly common signal to handle.
>
> Thoughts?
>
> Kind regards,
> --
> Nathan Fisher
>  w: http://junctionbox.ca/
>


-- 
Nathan Fisher
 w: http://junctionbox.ca/

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to