aboutsummaryrefslogtreecommitdiffstats
path: root/routers/repo/download.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
committerUnknwon <u@gogs.io>2016-03-11 11:56:52 -0500
commit514382e2ebfe6869268aeb919c1fa4d224687e13 (patch)
tree1aa8c4b3b1e771a5dc6f0bdd74567961570efcaa /routers/repo/download.go
parentcb1eadc2768ea5ffb2967eb4262e96730c3f9ba5 (diff)
downloadgitea-514382e2ebfe6869268aeb919c1fa4d224687e13.tar.gz
gitea-514382e2ebfe6869268aeb919c1fa4d224687e13.zip
Rename module: middleware -> context
Diffstat (limited to 'routers/repo/download.go')
-rw-r--r--routers/repo/download.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/download.go b/routers/repo/download.go
index a10792b87f..3329073e0c 100644
--- a/routers/repo/download.go
+++ b/routers/repo/download.go
@@ -11,10 +11,10 @@ import (
"github.com/gogits/git-module"
"github.com/gogits/gogs/modules/base"
- "github.com/gogits/gogs/modules/middleware"
+ "github.com/gogits/gogs/modules/context"
)
-func ServeData(ctx *middleware.Context, name string, reader io.Reader) error {
+func ServeData(ctx *context.Context, name string, reader io.Reader) error {
buf := make([]byte, 1024)
n, _ := reader.Read(buf)
if n > 0 {
@@ -36,7 +36,7 @@ func ServeData(ctx *middleware.Context, name string, reader io.Reader) error {
return err
}
-func ServeBlob(ctx *middleware.Context, blob *git.Blob) error {
+func ServeBlob(ctx *context.Context, blob *git.Blob) error {
dataRc, err := blob.Data()
if err != nil {
return err
@@ -45,7 +45,7 @@ func ServeBlob(ctx *middleware.Context, blob *git.Blob) error {
return ServeData(ctx, ctx.Repo.TreeName, dataRc)
}
-func SingleDownload(ctx *middleware.Context) {
+func SingleDownload(ctx *context.Context) {
blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreeName)
if err != nil {
if git.IsErrNotExist(err) {