A SignalName() method was recently (#25134) added to x/sys/unix to convert a numeric signal id to a name. It uses signalList array which contains names and numeric values for all known signals on every platform.
This is a proposal to add a complementary method to convert a string representation to a number.
// SignalNum returns the syscall.Signal for signal named s,
// or an error if a signal with such name is not found.
func SignalNum(s string) (syscall.Signal, error)
For example, SignalNum("SIGTERM") is to return 15, nil, and it should probably do the same for SignalNum("TERM") and SignalNum("term").
Update: s/SignalId/SignalNum/