Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
48476b29
提交
48476b29
authored
8月 25, 2017
作者:
Jeromy Johnson
提交者:
GitHub
8月 25, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4156 from ipfs/fix/go19
Fix Go 1.9 issues
上级
5f26f004
9c40c319
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
20 行增加
和
12 行删除
+20
-12
Rules.mk
cmd/ipfs/Rules.mk
+4
-4
serialfile.go
commands/files/serialfile.go
+8
-1
golang.mk
mk/golang.mk
+6
-5
Rules.mk
plugin/plugins/Rules.mk
+2
-2
没有找到文件。
cmd/ipfs/Rules.mk
浏览文件 @
48476b29
...
...
@@ -23,7 +23,7 @@ $(IPFS_BIN_$(d)): $(d) $$(DEPS_GO) ALWAYS #| $(DEPS_OO_$(d))
$(d)-install
:
GOFLAGS += $(cmd/ipfs_flags)
$(d)-install
:
$(d) $$(DEPS_GO) ALWAYS
go
install
$
(
go-flags-with-tags
)
./cmd/ipfs
$(GOCC)
install
$
(
go-flags-with-tags
)
./cmd/ipfs
.PHONY
:
$(d)-install
COVER_BIN_$(d)
:
= $(d)/ipfs-test-cover
...
...
@@ -31,9 +31,9 @@ CLEAN += $(COVER_BIN_$(d))
$(COVER_BIN_$(d))
:
GOTAGS += testrunmain
$(COVER_BIN_$(d))
:
$(d) $$(DEPS_GO) ALWAYS
$
(
eval
TMP_PKGS :
=
$(
shell
go
list
-f
'{{range .Deps}}{{.}} {{end}}'
$
(
go-flags-with-tags
)
./cmd/ipfs | sed
's/ /\n/g'
|
grep
ipfs/go-ipfs |
grep
-v
ipfs/go-ipfs/Godeps
)
$
(
call go-pkg-name,
$<
))
$
(
eval
TMP_PKGS :
=
$(
shell
$(GOCC)
list
-f
'{{range .Deps}}{{.}} {{end}}'
$
(
go-flags-with-tags
)
./cmd/ipfs | sed
's/ /\n/g'
|
grep
ipfs/go-ipfs |
grep
-v
ipfs/go-ipfs/Godeps
)
$
(
call go-pkg-name,
$<
))
$
(
eval
TMP_LIST :
=
$
(
call join-with,
$(comma)
,
$(TMP_PKGS)
))
@
echo
go
test
$@
-c
-covermode
atomic
-coverpkg
...
$
(
go-flags-with-tags
)
./
$
(
@D
)
# for info
@
go
test
-o
$@
-c
-covermode
atomic
-coverpkg
$(TMP_LIST)
$
(
go-flags-with-tags
)
./
$
(
@D
)
2>&1 |
(
grep
-v
'warning: no packages being tested'
||
true
)
@
echo
$(GOCC)
test
$@
-c
-covermode
atomic
-coverpkg
...
$
(
go-flags-with-tags
)
./
$
(
@D
)
# for info
@
$(GOCC)
test
-o
$@
-c
-covermode
atomic
-coverpkg
$(TMP_LIST)
$
(
go-flags-with-tags
)
./
$
(
@D
)
2>&1 |
(
grep
-v
'warning: no packages being tested'
||
true
)
include
mk/footer.mk
commands/files/serialfile.go
浏览文件 @
48476b29
...
...
@@ -60,7 +60,14 @@ func (f *serialFile) NextFile() (File, error) {
// if a file was opened previously, close it
err
:=
f
.
Close
()
if
err
!=
nil
{
return
nil
,
err
switch
err2
:=
err
.
(
type
)
{
case
*
os
.
PathError
:
if
err2
.
Err
!=
os
.
ErrClosed
{
return
nil
,
err
}
default
:
return
nil
,
err
}
}
// if there aren't any files left in the root directory, we're done
...
...
mk/golang.mk
浏览文件 @
48476b29
...
...
@@ -2,6 +2,7 @@
GO_MIN_VERSION
=
1.8
# pre-definitions
GOCC
?=
go
GOTAGS
?=
GOFLAGS
?=
GOTFLAGS
?=
...
...
@@ -10,16 +11,16 @@ DEPS_GO :=
TEST_GO
:=
CHECK_GO
:=
go-pkg-name
=
$(
shell
go
list
$
(
go-tags
)
github.com/ipfs/go-ipfs/
$
(
1
))
go-pkg-name
=
$(
shell
$(GOCC)
list
$
(
go-tags
)
github.com/ipfs/go-ipfs/
$
(
1
))
go-main-name
=
$
(
notdir
$
(
call go-pkg-name,
$
(
1
)))
$
(
?exe
)
go-curr-pkg-tgt
=
$(d)
/
$
(
call go-main-name,
$(d)
)
go-pkgs-novendor
=
$(
shell
go
list github.com/ipfs/go-ipfs/... |
grep
-v
/Godeps/
)
go-pkgs-novendor
=
$(
shell
$(GOCC)
list github.com/ipfs/go-ipfs/... |
grep
-v
/Godeps/
)
go-tags
=
$
(
if
$(GOTAGS)
,
-tags
=
"
$
(call join-with,
$(space)
,
$(GOTAGS)
)"
)
go-flags-with-tags
=
$(GOFLAGS)
$
(
go-tags
)
define
go-build
go
build
-i
$(go-flags-with-tags)
-o
"$@"
"$(call go-pkg-name,$<)"
$(GOCC)
build
-i
$(go-flags-with-tags)
-o
"$@"
"$(call go-pkg-name,$<)"
endef
test_go_short
:
GOTFLAGS += -test.short
...
...
@@ -31,7 +32,7 @@ test_go_race: test_go_expensive
.PHONY
:
test_go_race
test_go_expensive
:
$$(DEPS_GO)
go
test
$
(
go-flags-with-tags
)
$(GOTFLAGS)
./...
$(GOCC)
test
$
(
go-flags-with-tags
)
$(GOTFLAGS)
./...
.PHONY
:
test_go_expensive
TEST_GO
+=
test_go_expensive
...
...
@@ -41,7 +42,7 @@ test_go_fmt:
TEST_GO
+=
test_go_fmt
test_go_megacheck
:
@
go
get honnef.co/go/tools/cmd/megacheck
@
$(GOCC)
get honnef.co/go/tools/cmd/megacheck
@
for
pkg
in
$
(
go-pkgs-novendor
)
;
do
megacheck
"
$$
pkg"
;
done
.PHONY
:
megacheck
...
...
plugin/plugins/Rules.mk
浏览文件 @
48476b29
...
...
@@ -8,11 +8,11 @@ $(d)_plugins_main:=$(addsuffix /main/main.go,$($(d)_plugins))
$($(d)_plugins_main): d:=$(d)
$($(d)_plugins_main):
$(d)/gen_main.sh "$(dir $@).." "$(call go-pkg-name,$(dir $@)/..)"
go
fmt $@ >/dev/null
$(GOCC)
fmt $@ >/dev/null
$($(d)_plugins_so): %.so : %/main/main.go
$($(d)_plugins_so): $$(DEPS_GO) ALWAYS
go
build -buildmode=plugin -i -pkgdir "$(GOPATH)/pkg/linux_amd64_dynlink" $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$(basename $@))/main"
$(GOCC)
build -buildmode=plugin -i -pkgdir "$(GOPATH)/pkg/linux_amd64_dynlink" $(go-flags-with-tags) -o "$@" "$(call go-pkg-name,$(basename $@))/main"
chmod +x "$@"
CLEAN += $($(d)_plugins_so)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论