Skip to content
代码片段 群组 项目
提交 4b8b0451 编辑于 作者: Jacob Vosmaer's avatar Jacob Vosmaer
浏览文件

Add missing returns

上级 a085cecd
No related branches found
No related tags found
无相关合并请求
...@@ -31,6 +31,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) { ...@@ -31,6 +31,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
format = "tar.bz2" format = "tar.bz2"
default: default:
fail500(w, fmt.Errorf("handleGetArchive: invalid format: %s", urlPath)) fail500(w, fmt.Errorf("handleGetArchive: invalid format: %s", urlPath))
return
} }
archiveFilename := path.Base(r.ArchivePath) archiveFilename := path.Base(r.ArchivePath)
...@@ -53,6 +54,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) { ...@@ -53,6 +54,7 @@ func handleGetArchive(w http.ResponseWriter, r *gitRequest) {
tempFile, err := prepareArchiveTempfile(path.Dir(r.ArchivePath), archiveFilename) tempFile, err := prepareArchiveTempfile(path.Dir(r.ArchivePath), archiveFilename)
if err != nil { if err != nil {
fail500(w, fmt.Errorf("handleGetArchive: create tempfile: %v", err)) fail500(w, fmt.Errorf("handleGetArchive: create tempfile: %v", err))
return
} }
defer tempFile.Close() defer tempFile.Close()
defer os.Remove(tempFile.Name()) defer os.Remove(tempFile.Name())
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册