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 /routers/web/repo/view.go | |
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 'routers/web/repo/view.go')
-rw-r--r-- | routers/web/repo/view.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index e8c02b64b8..150ace212b 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -77,7 +77,7 @@ func getReadmeFileFromPath(commit *git.Commit, treePath string) (*namedBlob, err } var readmeFiles [4]*namedBlob - var exts = []string{".md", ".txt", ""} // sorted by priority + exts := []string{".md", ".txt", ""} // sorted by priority for _, entry := range entries { if entry.IsDir() { continue @@ -150,7 +150,7 @@ func renderDirectory(ctx *context.Context, treeLink string) { // strictly match an extension var readmeFiles [4]*namedBlob var docsEntries [3]*git.TreeEntry - var exts = []string{".md", ".txt", ""} // sorted by priority + exts := []string{".md", ".txt", ""} // sorted by priority for _, entry := range entries { if entry.IsDir() { lowerName := strings.ToLower(entry.Name()) @@ -368,7 +368,6 @@ func renderDirectory(ctx *context.Context, treeLink string) { ctx.Data["CanAddFile"] = !ctx.Repo.Repository.IsArchived ctx.Data["CanUploadFile"] = setting.Repository.Upload.Enabled && !ctx.Repo.Repository.IsArchived } - } func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink string) { @@ -399,7 +398,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st isDisplayingSource := ctx.FormString("display") == "source" isDisplayingRendered := !isDisplayingSource - //Check for LFS meta file + // Check for LFS meta file if isTextFile && setting.LFS.StartServer { pointer, _ := lfs.ReadPointerFromBuffer(buf) if pointer.IsValid() { |