1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-06-23 00:07:52 +02:00

Add the golines golangci-lint formatter (#6513)

Ensure consistent line wrapping (<= 120 characters) within the project.
This commit is contained in:
Tyler Yahn
2025-03-30 11:46:44 +01:00
committed by GitHub
parent b59d0591cf
commit 7512a2be2e
96 changed files with 1774 additions and 426 deletions

View File

@ -69,11 +69,26 @@ func TestGetFirstAvailableFile(t *testing.T) {
}{
{"Gets first, skip second candidate", []string{filename1, filename2}, filename1, ""},
{"Skips first, gets second candidate", []string{"does_not_exists", filename2}, filename2, ""},
{"Skips first, gets second, ignores third candidate", []string{"does_not_exists", filename2, filename1}, filename2, ""},
{
"Skips first, gets second, ignores third candidate",
[]string{"does_not_exists", filename2, filename1},
filename2,
"",
},
{"No candidates (empty slice)", []string{}, "", "no candidate file available: []"},
{"No candidates (nil slice)", nil, "", "no candidate file available: []"},
{"Single nonexisting candidate", []string{"does_not_exists"}, "", "no candidate file available: [does_not_exists]"},
{"Multiple nonexisting candidates", []string{"does_not_exists", "this_either"}, "", "no candidate file available: [does_not_exists this_either]"},
{
"Single nonexisting candidate",
[]string{"does_not_exists"},
"",
"no candidate file available: [does_not_exists]",
},
{
"Multiple nonexisting candidates",
[]string{"does_not_exists", "this_either"},
"",
"no candidate file available: [does_not_exists this_either]",
},
}
for _, tc := range tt {