diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-27 18:14:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-27 18:14:25 +0800 |
commit | 94da47271701401b6959bfd308d6c74fd30b22e2 (patch) | |
tree | 92a6c3298ab198efa04fbe4409d282da44736640 /modules/context/api.go | |
parent | 0a76d260fa16764ab66bf1623b4cd9e9adfdac27 (diff) | |
download | gitea-94da47271701401b6959bfd308d6c74fd30b22e2.tar.gz gitea-94da47271701401b6959bfd308d6c74fd30b22e2.zip |
Golint fixed for modules/setting (#262)
* golint fixed for modules/setting
* typo fixed and renamed UNIXSOCKET to UnixSocket
Diffstat (limited to 'modules/context/api.go')
-rw-r--r-- | modules/context/api.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/context/api.go b/modules/context/api.go index 2823d696d2..7706e9c499 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -47,16 +47,16 @@ func (ctx *APIContext) SetLinkHeader(total, pageSize int) { page := paginater.New(total, pageSize, ctx.QueryInt("page"), 0) links := make([]string, 0, 4) if page.HasNext() { - links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"next\"", setting.AppUrl, ctx.Req.URL.Path[1:], page.Next())) + links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"next\"", setting.AppURL, ctx.Req.URL.Path[1:], page.Next())) } if !page.IsLast() { - links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"last\"", setting.AppUrl, ctx.Req.URL.Path[1:], page.TotalPages())) + links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"last\"", setting.AppURL, ctx.Req.URL.Path[1:], page.TotalPages())) } if !page.IsFirst() { - links = append(links, fmt.Sprintf("<%s%s?page=1>; rel=\"first\"", setting.AppUrl, ctx.Req.URL.Path[1:])) + links = append(links, fmt.Sprintf("<%s%s?page=1>; rel=\"first\"", setting.AppURL, ctx.Req.URL.Path[1:])) } if page.HasPrevious() { - links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"prev\"", setting.AppUrl, ctx.Req.URL.Path[1:], page.Previous())) + links = append(links, fmt.Sprintf("<%s%s?page=%d>; rel=\"prev\"", setting.AppURL, ctx.Req.URL.Path[1:], page.Previous())) } if len(links) > 0 { |