- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
如何修复空包路径错误?我不清楚哪个包有问题或如何解决。
vendor/vendor.json
json 文件。
{
"comment": "",
"heroku": {
"goVersion": "go1.6",
"install": [
"."
]
},
"ignore": "test",
"package": [
{
"path": "context",
"revision": ""
},
{
"checksumSHA1": "eJQuyvuWx82bVvH0+b7a1AOQGqs=",
"path": "github.com/ChimeraCoder/anaconda",
"revision": "00ecb7b4510497dc28cd46a598007ab8fe01f889",
"revisionTime": "2016-06-04T23:38:44Z"
},
{
"checksumSHA1": "xE9Zo5ubzdEVBeRf+yD/ZjLALHk=",
"path": "github.com/ChimeraCoder/tokenbucket",
"revision": "c5a927568de7aad8a58127d80bcd36ca4e71e454",
"revisionTime": "2013-12-01T22:36:12Z"
},
{
"checksumSHA1": "3RgReu+42CU1EQ6afDsVSvBuPyk=",
"path": "github.com/azr/backoff",
"revision": "53511d3c733003985b0b76f733df1f4d0095ee6a",
"revisionTime": "2016-01-15T11:51:03Z"
},
{
"checksumSHA1": "bO0ErJXuVJ7s7DS4AJlN55op8cM=",
"path": "github.com/dghubble/oauth1",
"revision": "d9f485600d309576dfa9764424f537e1f254d9a1",
"revisionTime": "2016-08-21T06:27:25Z"
},
{
"checksumSHA1": "ycg56E+pTPAHToKMIj8C5SZ+WYQ=",
"path": "github.com/dustin/go-jsonpointer",
"revision": "ba0abeacc3dcca5b9b20f31509c46794edbc9965",
"revisionTime": "2016-08-14T07:29:49Z"
},
{
"checksumSHA1": "2138MttIW/b+UkA4YMYcTc6yzOU=",
"path": "github.com/dustin/gojson",
"revision": "2e71ec9dd5adce3b168cd0dbde03b5cc04951c30",
"revisionTime": "2016-03-07T16:12:27Z"
},
{
"checksumSHA1": "PYBCaIzh3RFkxtkkP8x4XCEYLCg=",
"path": "github.com/garyburd/go-oauth/oauth",
"revision": "719b069913e1151a73ea30d2ea4f90deda3ce234",
"revisionTime": "2016-04-12T16:13:20Z"
},
{
"checksumSHA1": "mOUDsWfYLlh8f6ekwyIUo3+4xJI=",
"path": "goji.io",
"revision": "e355964ac565b94cf0fc7f218346626529125086",
"revisionTime": "2016-05-07T21:13:57Z"
},
{
"checksumSHA1": "Jf3C/refSMB2wVYGp1pssKXVNcI=",
"path": "goji.io/internal",
"revision": "e355964ac565b94cf0fc7f218346626529125086",
"revisionTime": "2016-05-07T21:13:57Z"
},
{
"checksumSHA1": "gHp/Mv7vgZWs7iq/F0YHnWgEotQ=",
"path": "goji.io/pat",
"revision": "e355964ac565b94cf0fc7f218346626529125086",
"revisionTime": "2016-05-07T21:13:57Z"
},
{
"checksumSHA1": "z2zVlHamw4ufyuSaf49reuusrmg=",
"path": "goji.io/pattern",
"revision": "e355964ac565b94cf0fc7f218346626529125086",
"revisionTime": "2016-05-07T21:13:57Z"
},
{
"checksumSHA1": "9jjO5GjLa0XF/nfWihF02RoH4qc=",
"path": "golang.org/x/net/context",
"revision": "6c89f9617983ee917132513a791d8b5850fe90c5",
"revisionTime": "2016-08-24T21:03:21Z"
}
],
"rootPath": "thinkwire.com/thw1"
}
完整的堆栈跟踪。
$ govendor fetch lib/pq
panic: Empty package path
goroutine 1 [running]:
panic(0x4b9c20, 0xc8200123e0)
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6
github.com/kardianos/govendor/context.(*Context).setPackage(0xc820122000, 0xc820326420, 0x26, 0xc82029d5a0, 0x0, 0xc82029d5a0, 0x0, 0xc820112060, 0x26, 0x10201, ...)
$GOPATH/src/github.com/kardianos/govendor/context/resolve.go:335 +0x8ba
github.com/kardianos/govendor/context.(*Context).addSingleImport(0xc820122000, 0xc8203189c0, 0x2b, 0xc82029d5a0, 0x0, 0x0, 0x0, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/context/resolve.go:383 +0x457
github.com/kardianos/govendor/context.(*Context).addFileImports(0xc820122000, 0xc8203189c0, 0x30, 0xc820118080, 0x15, 0x27, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/context/resolve.go:251 +0x13e8
github.com/kardianos/govendor/context.(*Context).loadPackage.func1(0xc8203189c0, 0x30, 0xda5950, 0xc820312820, 0x0, 0x0, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/context/resolve.go:55 +0x150
github.com/kardianos/govendor/internal/vfilepath.walk(0xc8203189c0, 0x30, 0xda5950, 0xc820312820, 0xc820118780, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/internal/vfilepath/walk.go:19 +0x80
github.com/kardianos/govendor/internal/vfilepath.walk(0xc8203188a0, 0x2a, 0xda5950, 0xc820312680, 0xc820118780, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/internal/vfilepath/walk.go:44 +0x4f5
github.com/kardianos/govendor/internal/vfilepath.walk(0xc820112990, 0x27, 0xda5950, 0xc820134680, 0xc820118780, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/internal/vfilepath/walk.go:44 +0x4f5
github.com/kardianos/govendor/internal/vfilepath.Walk(0xc820112990, 0x27, 0xc820118780, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/internal/vfilepath/walk.go:82 +0xe1
github.com/kardianos/govendor/context.(*Context).loadPackage(0xc820122000, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/context/resolve.go:72 +0x19a
github.com/kardianos/govendor/context.(*Context).modify(0xc820122000, 0xc820120140, 0x7fff5fbff804, 0xc8200f77e5, 0x0, 0x3, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/context/modify.go:232 +0xfcf
github.com/kardianos/govendor/context.(*Context).ModifyImport(0xc820122000, 0xc820120140, 0xc82000a204, 0xc8200f77e5, 0x0, 0x3, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/context/modify.go:183 +0x23b
github.com/kardianos/govendor/run.(*runner).Modify(0xc8200f7d50, 0xda51c0, 0xc82002a010, 0xc82000a260, 0x1, 0x1, 0x81de04, 0xda5808, 0xc8200f7db7, 0x12ec8, ...)
$GOPATH/src/github.com/kardianos/govendor/run/modify.go:105 +0x9e7
github.com/kardianos/govendor/run.(*runner).run(0xc8200f7d50, 0xda51c0, 0xc82002a010, 0xc82000a240, 0x3, 0x3, 0xda5808, 0xc8200f7db7, 0xda5808, 0x0, ...)
$GOPATH/src/github.com/kardianos/govendor/run/run.go:83 +0x662
github.com/kardianos/govendor/run.Run(0xda51c0, 0xc82002a010, 0xc82000a240, 0x3, 0x3, 0xda5808, 0xc8200f7db7, 0x0, 0x0, 0x0)
$GOPATH/src/github.com/kardianos/govendor/run/run.go:41 +0x95
main.main()
$GOPATH/src/github.com/kardianos/govendor/main.go:35 +0x453
最佳答案
我想通了。问题是我在项目中以中间状态保存了一个文件。
package whatever
import (
""
)
govendor
提示导入语句是空的。
关于政府 panic : Empty package path,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39333942/
在Go(go1.2.1 linux/amd64)中运行http服务器时,我遇到了一个罕见的错误。 unexpected fault address 0xb84004 fatal error: faul
使用以下代码: var i interface{} = "hello" f, ok := i.(float64) fmt.Println(f, ok) f = i.(float64) // panic
考虑以下故意导致双重 panic 的代码: use scopeguard::defer; // 1.1.0 fn main() { defer!{ panic!() }; defer!
如果我传递给 std::panic::set_hook 的函数发生 panic 会怎样? 我可以想象对此做出多种 react :考虑这个 UB,中止程序 like C++ does ,为新的 pani
我有一个 string,当我想获取 i 索引处的值时它会崩溃,但是当我切出相同的 string 保持较低的索引值作为长度然后它不会 panic 。想知道 1 和 2 有何不同? func main()
看起来不可能从 panic 中的 panic 中恢复过来? func TestError(t *testing.T) { e := &myErr{p: false} fmt.Print
当我使用 cargo test 运行以下程序时: use std::panic; fn assert_panic_func(f: fn() -> (), msg: String) { let
在开发过程中,我遇到了崩溃,并显示了内核 panic 上传模式。 有没有办法以某种方式连接到设备并提取日志? 最佳答案 我希望这就是您正在寻找的...来源:StackOverflowAndroid 创
我需要制造内核 panic ,我尝试了以下操作 sysctl kernel.panic=0 && echo c > /proc/sysrq-trigger 当我运行上面的命令时。我看到系统总是重新启动
是否可以从 recover 中“重新抛出”错误并保留原始堆栈跟踪?我知道的最好的办法就是再次 panic ,但这确实会创建一个新的堆栈跟踪。 func do() { defer func()
我正在使用 panic::catch_unwind引起 panic : use std::panic; fn main() { let result = panic::catch_unwind
func sub(){ defer func (){ panic(2) }() panic(1) } func main(){ defer func()
考虑到我使用的是原始的“errors”go 包。 还有,panic(11) 和 panic("11") 之间的区别? 最佳答案 panic定义为 func panic(v interface{}),调
我是 golang 的新手。在定义位置后 try catch 主 block 中的错误后,我的程序出现 panic 。我在某处读过,添加 defer.close() 可能会有所帮助,但编译器再次说你的
有这种新的编程语言 V-lang由亚历克斯·梅德维尼科夫 (Alex Medvednikov) 创建。我目前使用的是 V-lang 0.1.11 版。我可以在 V-lang 中声明一个数组,如下所示:
在启动 linux 时,我在控制台上得到以下打印,并且系统挂起。 Waiting for root device /dev/mmcblk0p2... mmc_host mmc0: Bus speed
我已经实现了这个 answer 中提到的 goroutine 的生产者-消费者模式.但它有时会出现 panic ,并出现错误提示:“ panic :同步:负 WaitGroup 计数器”。我有如下示例
上下文: https://github.com/fusspawn/tserver/blob/master/app/controllers/gorp.go 作为尝试设置 gorm 的一部分,我尝试转换标
专注Golang,Python语言,云原生,人工智能领域得博主 过去经历的意义在于引导你,而非定义你, 只要我们足够努力,任何人都有无限潜力 panic 抛出异常函数 recove
这个问题在这里已经有了答案: How to return a value in a Go function that panics? (3 个回答) 2年前关闭。 package main impor
我是一名优秀的程序员,十分优秀!