summaryrefslogtreecommitdiffstats
path: root/services/gitdiff
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2021-12-20 05:41:31 +0100
committerGitHub <noreply@github.com>2021-12-20 04:41:31 +0000
commitff2fd08228dd6323ac4a1cbd2f37f8ae15733eab (patch)
tree9079b869968d358502f64ce03caf4097556c53cd /services/gitdiff
parent25677cdc5b11f7100ca2e4b0819e02ca62e22ab1 (diff)
downloadgitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.tar.gz
gitea-ff2fd08228dd6323ac4a1cbd2f37f8ae15733eab.zip
Simplify parameter types (#18006)
Remove repeated type declarations in function definitions.
Diffstat (limited to 'services/gitdiff')
-rw-r--r--services/gitdiff/csv.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/gitdiff/csv.go b/services/gitdiff/csv.go
index 099660b172..0e56ff3150 100644
--- a/services/gitdiff/csv.go
+++ b/services/gitdiff/csv.go
@@ -111,7 +111,7 @@ func (csv *csvReader) readNextRow() ([]string, error) {
}
// CreateCsvDiff creates a tabular diff based on two CSV readers.
-func CreateCsvDiff(diffFile *DiffFile, baseReader *csv.Reader, headReader *csv.Reader) ([]*TableDiffSection, error) {
+func CreateCsvDiff(diffFile *DiffFile, baseReader, headReader *csv.Reader) ([]*TableDiffSection, error) {
if baseReader != nil && headReader != nil {
return createCsvDiff(diffFile, baseReader, headReader)
}
@@ -149,7 +149,7 @@ func createCsvDiffSingle(reader *csv.Reader, celltype TableDiffCellType) ([]*Tab
return []*TableDiffSection{{Rows: rows}}, nil
}
-func createCsvDiff(diffFile *DiffFile, baseReader *csv.Reader, headReader *csv.Reader) ([]*TableDiffSection, error) {
+func createCsvDiff(diffFile *DiffFile, baseReader, headReader *csv.Reader) ([]*TableDiffSection, error) {
// Given the baseReader and headReader, we are going to create CSV Reader for each, baseCSVReader and b respectively
baseCSVReader, err := createCsvReader(baseReader, maxRowsToInspect)
if err != nil {
@@ -346,7 +346,7 @@ func createCsvDiff(diffFile *DiffFile, baseReader *csv.Reader, headReader *csv.R
}
// getColumnMapping creates a mapping of columns between a and b
-func getColumnMapping(baseCSVReader *csvReader, headCSVReader *csvReader) ([]int, []int) {
+func getColumnMapping(baseCSVReader, headCSVReader *csvReader) ([]int, []int) {
baseRow, _ := baseCSVReader.GetRow(0)
headRow, _ := headCSVReader.GetRow(0)