1
0
Fork 0
forked from forgejo/forgejo

format with gofumpt (#18184)

* gofumpt -w -l .

* gofumpt -w -l -extra .

* Add linter

* manual fix

* change make fmt
This commit is contained in:
6543 2022-01-20 18:46:10 +01:00 committed by GitHub
parent 1d98d205f5
commit 54e9ee37a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
423 changed files with 1585 additions and 1758 deletions

View file

@ -12,9 +12,11 @@ import (
"code.gitea.io/gitea/modules/util"
)
const unmappedColumn = -1
const maxRowsToInspect int = 10
const minRatioToMatch float32 = 0.8
const (
unmappedColumn = -1
maxRowsToInspect int = 10
minRatioToMatch float32 = 0.8
)
// TableDiffCellType represents the type of a TableDiffCell.
type TableDiffCellType uint8
@ -172,7 +174,7 @@ func createCsvDiff(diffFile *DiffFile, baseReader, headReader *csv.Reader) ([]*T
// createDiffTableRow takes the row # of the `a` line and `b` line of a diff (starting from 1), 0 if the line doesn't exist (undefined)
// in the base or head respectively.
// Returns a TableDiffRow which has the row index
createDiffTableRow := func(aLineNum int, bLineNum int) (*TableDiffRow, error) {
createDiffTableRow := func(aLineNum, bLineNum int) (*TableDiffRow, error) {
// diffTableCells is a row of the diff table. It will have a cells for added, deleted, changed, and unchanged content, thus either
// the same size as the head table or bigger
diffTableCells := make([]*TableDiffCell, numDiffTableCols)