github.com/amarpal/go-tools@v0.0.0-20240422043104-40142f59f616/staticcheck/sa1016/testdata/src/example.com/CheckUntrappableSignal/CheckUntrappableSignal_unix.go.golden (about)

     1  //go:build android || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
     2  // +build android darwin dragonfly freebsd linux netbsd openbsd solaris
     3  
     4  package main
     5  
     6  import (
     7  	"os"
     8  	"os/signal"
     9  	"syscall"
    10  )
    11  
    12  func fn2() {
    13  	c := make(chan os.Signal, 1)
    14  	signal.Ignore()  //@ diag(`cannot be trapped`)
    15  	signal.Notify(c) //@ diag(`cannot be trapped`)
    16  	signal.Reset()   //@ diag(`cannot be trapped`)
    17  }