我正在尝试在 Go 中编译我的应用程序,但出现以下错误:
C:\Users\Root\go\src\github.com\ussssseeeeeeerrr\test> go build
# github.com/facebookgo/grace/gracehttp
..\..\facebookgo\grace\gracehttp\http.go:104:53: undefined: syscall.SIGUSR2
..\..\facebookgo\grace\gracehttp\http.go:114:8: undefined: syscall.SIGUSR2
..\..\facebookgo\grace\gracehttp\http.go:154:13: undefined: syscall.Kill
# github.com/ussssseeeeeeerrr/test/models
C:\Go\src\github.com\ussssseeeeeeerrr\test\models\setup.go:24:2: undefined: runner.MustPing
我不确定我做错了什么。
http.go {第 104 行}:
signal.Notify(ch, syscall.SIGINT, syscall.SIGTERM, syscall.SIGUSR2)
http.go {第 114 行}:
case syscall.SIGUSR2:
http.go {第 154 行}:
if err := syscall.Kill(ppid, syscall.SIGTERM); err != nil {
导入()部分:
"bytes"
"crypto/tls"
"fmt"
"log"
"net"
"net/http"
"os"
"os/signal"
"sync"
"syscall"
"github.com/facebookgo/grace/gracenet"
"github.com/facebookgo/httpdown"
setup.go {第 24 行}:
runner.MustPing(db)
导入()部分:
runner "gopkg.in/mgutz/dat.v1/sqlx-runner"