1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-08-06 17:40:58 +00:00

chore: upgrade golangci-lint and address findings (#1904)

This commit is contained in:
Casey Lee 2023-07-10 17:12:12 -07:00 committed by GitHub
parent 63a3f64d12
commit 28c6da4522
21 changed files with 48 additions and 48 deletions

View file

@ -273,7 +273,7 @@ func readArgsFile(file string, split bool) []string {
return args
}
func setup(inputs *Input) func(*cobra.Command, []string) {
func setup(_ *Input) func(*cobra.Command, []string) {
return func(cmd *cobra.Command, _ []string) {
verbose, _ := cmd.Flags().GetBool("verbose")
if verbose {
@ -343,12 +343,11 @@ func parseMatrix(matrix []string) map[string]map[string]bool {
matrix := r.Split(m, 2)
if len(matrix) < 2 {
log.Fatalf("Invalid matrix format. Failed to parse %s", m)
} else {
if _, ok := matrixes[matrix[0]]; !ok {
matrixes[matrix[0]] = make(map[string]bool)
}
matrixes[matrix[0]][matrix[1]] = true
}
if _, ok := matrixes[matrix[0]]; !ok {
matrixes[matrix[0]] = make(map[string]bool)
}
matrixes[matrix[0]][matrix[1]] = true
}
return matrixes
}