Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
b9d055c0
提交
b9d055c0
authored
2月 08, 2016
作者:
Jeromy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove context from godeps, its in gx now
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
上级
a871f371
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
5 行增加
和
26 行删除
+5
-26
context.go
Godeps/_workspace/src/golang.org/x/net/context/context.go
+0
-0
context_test.go
...s/_workspace/src/golang.org/x/net/context/context_test.go
+0
-0
withtimeout_test.go
...orkspace/src/golang.org/x/net/context/withtimeout_test.go
+0
-26
package.json
package.json
+5
-0
没有找到文件。
Godeps/_workspace/src/golang.org/x/net/context/context.go
deleted
100644 → 0
浏览文件 @
a871f371
差异被折叠。
点击展开。
Godeps/_workspace/src/golang.org/x/net/context/context_test.go
deleted
100644 → 0
浏览文件 @
a871f371
差异被折叠。
点击展开。
Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go
deleted
100644 → 0
浏览文件 @
a871f371
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
context_test
import
(
"fmt"
"time"
"gx/ipfs/QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt/go-net/context"
)
func
ExampleWithTimeout
()
{
// Pass a context with a timeout to tell a blocking function that it
// should abandon its work after the timeout elapses.
ctx
,
_
:=
context
.
WithTimeout
(
context
.
Background
(),
100
*
time
.
Millisecond
)
select
{
case
<-
time
.
After
(
200
*
time
.
Millisecond
)
:
fmt
.
Println
(
"overslept"
)
case
<-
ctx
.
Done
()
:
fmt
.
Println
(
ctx
.
Err
())
// prints "context deadline exceeded"
}
// Output:
// context deadline exceeded
}
package.json
浏览文件 @
b9d055c0
...
...
@@ -11,6 +11,11 @@
"name"
:
"go-libp2p"
,
"hash"
:
"QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4"
,
"version"
:
"1.0.0"
},
{
"name"
:
"go-net"
,
"hash"
:
"QmZy2y8t9zQH2a1b8q2ZSLKp17ATuJoCNxxyMFG5qFExpt"
,
"version"
:
"0.0.0"
}
],
"language"
:
"go"
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论