diff options
author | 6543 <6543@obermui.de> | 2022-01-20 18:46:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 18:46:10 +0100 |
commit | 54e9ee37a7a301dbe74d46fd3c87712e6120e9bf (patch) | |
tree | 1be12fb072625c1b896b9d72f7912b018aad502b /services/lfs | |
parent | 1d98d205f5825f40110e6628b61a97c91ac7f72d (diff) | |
download | gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.tar.gz gitea-54e9ee37a7a301dbe74d46fd3c87712e6120e9bf.zip |
format with gofumpt (#18184)
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
Diffstat (limited to 'services/lfs')
-rw-r--r-- | services/lfs/locks.go | 6 | ||||
-rw-r--r-- | services/lfs/server.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/services/lfs/locks.go b/services/lfs/locks.go index c2ede20b7c..3839119b27 100644 --- a/services/lfs/locks.go +++ b/services/lfs/locks.go @@ -80,7 +80,7 @@ func GetListLockHandler(ctx *context.Context) { limit = 0 } id := ctx.FormString("id") - if id != "" { //Case where we request a specific id + if id != "" { // Case where we request a specific id v, err := strconv.ParseInt(id, 10, 64) if err != nil { ctx.JSON(http.StatusBadRequest, api.LFSLockError{ @@ -97,7 +97,7 @@ func GetListLockHandler(ctx *context.Context) { } path := ctx.FormString("path") - if path != "" { //Case where we request a specific id + if path != "" { // Case where we request a specific id lock, err := models.GetLFSLock(repository, path) if err != nil && !models.IsErrLFSLockNotExist(err) { log.Error("Unable to get lock for repository %-v with path %s: Error: %v", repository, path, err) @@ -106,7 +106,7 @@ func GetListLockHandler(ctx *context.Context) { return } - //If no query params path or id + // If no query params path or id lockList, err := models.GetLFSLockByRepoID(repository.ID, cursor, limit) if err != nil { log.Error("Unable to list locks for repository ID[%d]: Error: %v", repository.ID, err) diff --git a/services/lfs/server.go b/services/lfs/server.go index 25882928a2..cdce0046b3 100644 --- a/services/lfs/server.go +++ b/services/lfs/server.go @@ -440,7 +440,7 @@ func buildObjectResponse(rc *requestContext, pointer lfs_module.Pointer, downloa if download { rep.Actions["download"] = &lfs_module.Link{Href: rc.DownloadLink(pointer), Header: header} if setting.LFS.ServeDirect { - //If we have a signed url (S3, object storage), redirect to this directly. + // If we have a signed url (S3, object storage), redirect to this directly. u, err := storage.LFS.URL(pointer.RelativePath(), pointer.Oid) if u != nil && err == nil { rep.Actions["download"] = &lfs_module.Link{Href: u.String(), Header: header} |