Enable golangci linter forcetypeassert (#3168)

Split out from https://github.com/woodpecker-ci/woodpecker/pull/2960
This commit is contained in:
Robert Kaussow
2024-01-12 02:01:02 +01:00
committed by GitHub
parent f813badcf9
commit 9bbba4441d
13 changed files with 81 additions and 39 deletions

View File

@@ -51,11 +51,12 @@ func Test_github(t *testing.T) {
Secret: "I1NiIsInR5",
SkipVerify: true,
})
g.Assert(forge.(*client).url).Equal("http://localhost:8080")
g.Assert(forge.(*client).API).Equal("http://localhost:8080/api/v3/")
g.Assert(forge.(*client).Client).Equal("0ZXh0IjoiI")
g.Assert(forge.(*client).Secret).Equal("I1NiIsInR5")
g.Assert(forge.(*client).SkipVerify).Equal(true)
f, _ := forge.(*client)
g.Assert(f.url).Equal("http://localhost:8080")
g.Assert(f.API).Equal("http://localhost:8080/api/v3/")
g.Assert(f.Client).Equal("0ZXh0IjoiI")
g.Assert(f.Secret).Equal("I1NiIsInR5")
g.Assert(f.SkipVerify).Equal(true)
})
})