MiSecurity / x-patrol

github泄露扫描系统
1.15k stars 303 forks source link

build报错 #23

Closed xuyanhua closed 5 years ago

xuyanhua commented 5 years ago

github.com/go-xorm/builder

../github.com/go-xorm/builder/builder.go:352: undefined: sql.NamedArg ../github.com/go-xorm/builder/builder.go:364: undefined: sql.Named ../github.com/go-xorm/builder/sql.go:110: undefined: sql.NamedArg

github.com/go-xorm/core

../github.com/go-xorm/core/db.go:120: db.DB.QueryContext undefined (type sql.DB has no field or method QueryContext) ../github.com/go-xorm/core/db.go:206: db.DB.ExecContext undefined (type sql.DB has no field or method ExecContext) ../github.com/go-xorm/core/db.go:206: not enough arguments to return ../github.com/go-xorm/core/db.go:218: db.DB.ExecContext undefined (type sql.DB has no field or method ExecContext) ../github.com/go-xorm/core/db.go:218: not enough arguments to return ../github.com/go-xorm/core/stmt.go:29: db.DB.PrepareContext undefined (type sql.DB has no field or method PrepareContext) ../github.com/go-xorm/core/stmt.go:50: s.Stmt.ExecContext undefined (type sql.Stmt has no field or method ExecContext) ../github.com/go-xorm/core/stmt.go:50: not enough arguments to return ../github.com/go-xorm/core/stmt.go:67: s.Stmt.ExecContext undefined (type sql.Stmt has no field or method ExecContext) ../github.com/go-xorm/core/tx.go:17: undefined: sql.TxOptions ../github.com/go-xorm/core/stmt.go:67: too many errors

github.com/go-sql-driver/mysql

../github.com/go-sql-driver/mysql/connection.go:475: undefined: driver.TxOptions ../github.com/go-sql-driver/mysql/connection.go:481: undefined: sql.IsolationLevel ../github.com/go-sql-driver/mysql/connection.go:481: undefined: sql.LevelDefault ../github.com/go-sql-driver/mysql/connection.go:495: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:514: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:548: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:567: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:631: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/utils.go:730: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/utils.go:742: undefined: driver.IsolationLevel ../github.com/go-sql-driver/mysql/connection.go:481: too many errors

github.com/lib/pq

../github.com/lib/pq/conn_go18.go:13: undefined: driver.NamedValue ../github.com/lib/pq/conn_go18.go:31: undefined: driver.NamedValue ../github.com/lib/pq/conn_go18.go:45: undefined: driver.TxOptions ../github.com/lib/pq/conn_go18.go:48: undefined: sql.IsolationLevel ../github.com/lib/pq/conn_go18.go:49: undefined: sql.LevelDefault ../github.com/lib/pq/conn_go18.go:51: undefined: sql.LevelReadUncommitted ../github.com/lib/pq/conn_go18.go:53: undefined: sql.LevelReadCommitted ../github.com/lib/pq/conn_go18.go:55: undefined: sql.LevelRepeatableRead ../github.com/lib/pq/conn_go18.go:57: undefined: sql.LevelSerializable ../github.com/lib/pq/notify.go:790: undefined: time.Until ../github.com/lib/pq/notify.go:790: too many errors

github.com/google/go-github/github

../github.com/google/go-github/github/search.go:230: undefined: url.PathEscape mv: rename main to x-patrol_darwin_amd64: No such file or directory

github.com/go-xorm/builder

../github.com/go-xorm/builder/builder.go:352: undefined: sql.NamedArg ../github.com/go-xorm/builder/builder.go:364: undefined: sql.Named ../github.com/go-xorm/builder/sql.go:110: undefined: sql.NamedArg

github.com/go-xorm/core

../github.com/go-xorm/core/db.go:120: db.DB.QueryContext undefined (type sql.DB has no field or method QueryContext) ../github.com/go-xorm/core/db.go:206: db.DB.ExecContext undefined (type sql.DB has no field or method ExecContext) ../github.com/go-xorm/core/db.go:206: not enough arguments to return ../github.com/go-xorm/core/db.go:218: db.DB.ExecContext undefined (type sql.DB has no field or method ExecContext) ../github.com/go-xorm/core/db.go:218: not enough arguments to return ../github.com/go-xorm/core/stmt.go:29: db.DB.PrepareContext undefined (type sql.DB has no field or method PrepareContext) ../github.com/go-xorm/core/stmt.go:50: s.Stmt.ExecContext undefined (type sql.Stmt has no field or method ExecContext) ../github.com/go-xorm/core/stmt.go:50: not enough arguments to return ../github.com/go-xorm/core/stmt.go:67: s.Stmt.ExecContext undefined (type sql.Stmt has no field or method ExecContext) ../github.com/go-xorm/core/tx.go:17: undefined: sql.TxOptions ../github.com/go-xorm/core/stmt.go:67: too many errors

github.com/go-sql-driver/mysql

../github.com/go-sql-driver/mysql/connection.go:475: undefined: driver.TxOptions ../github.com/go-sql-driver/mysql/connection.go:481: undefined: sql.IsolationLevel ../github.com/go-sql-driver/mysql/connection.go:481: undefined: sql.LevelDefault ../github.com/go-sql-driver/mysql/connection.go:495: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:514: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:548: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:567: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/connection.go:631: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/utils.go:730: undefined: driver.NamedValue ../github.com/go-sql-driver/mysql/utils.go:742: undefined: driver.IsolationLevel ../github.com/go-sql-driver/mysql/connection.go:481: too many errors

github.com/lib/pq

../github.com/lib/pq/conn_go18.go:13: undefined: driver.NamedValue ../github.com/lib/pq/conn_go18.go:31: undefined: driver.NamedValue ../github.com/lib/pq/conn_go18.go:45: undefined: driver.TxOptions ../github.com/lib/pq/conn_go18.go:48: undefined: sql.IsolationLevel ../github.com/lib/pq/conn_go18.go:49: undefined: sql.LevelDefault ../github.com/lib/pq/conn_go18.go:51: undefined: sql.LevelReadUncommitted ../github.com/lib/pq/conn_go18.go:53: undefined: sql.LevelReadCommitted ../github.com/lib/pq/conn_go18.go:55: undefined: sql.LevelRepeatableRead ../github.com/lib/pq/conn_go18.go:57: undefined: sql.LevelSerializable ../github.com/lib/pq/notify.go:790: undefined: time.Until ../github.com/lib/pq/notify.go:790: too many errors

netxfly commented 5 years ago

我当时没有使用包管理,依赖的包都是通过go get安装的。刚才在一台全新的mac中编译了下,结论是可以正常build。以下为全部需要安装的包列表:

go get github.com/etsy/hound/codesearch/sparse
go get github.com/go-macaron/cache
go get github.com/go-macaron/captcha
go get github.com/go-macaron/csrf
go get github.com/go-macaron/session
go get github.com/go-sql-driver/mysql
go get github.com/go-xorm/core
go get github.com/go-xorm/xorm
go get github.com/google/go-github/github
go get github.com/lib/pq
go get github.com/sirupsen/logrus
go get github.com/urfave/cli
go get github.com/x-cray/logrus-prefixed-formatter
go get golang.org/x/oauth2
go get gopkg.in/ini.v1
go get gopkg.in/macaron.v1
xuyanhua commented 5 years ago

嗯,之前用的go版本偏低,改成最新的build正常