mirror of
https://github.com/appleboy/drone-jenkins.git
synced 2026-06-04 18:23:57 +08:00
refactor: extract repeated string literals into constants
- Add tokenParam const in jenkins.go and reuse across main.go - Add shared test_helpers_test.go with test constants - Remove unused //nolint:gosec directive in jenkins.go - Resolve golangci-lint v2.12 goconst and nolintlint warnings
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package main
|
||||
|
||||
const (
|
||||
testUserFoo = "foo"
|
||||
testUserBar = "bar"
|
||||
testUserName = "test"
|
||||
testJobName = "test-job"
|
||||
testExampleURL = "http://example.com"
|
||||
testAuthRequiredErr = "authentication required"
|
||||
testRemoteTokenValue = "remote-token-123"
|
||||
testWhitespaceVal = " "
|
||||
testValidStr = "valid"
|
||||
testParamKey = "key"
|
||||
testParamKey1 = "key1"
|
||||
testParamKey2 = "key2"
|
||||
testParamValue1 = "value1"
|
||||
testParamValue2 = "value2"
|
||||
)
|
||||
Reference in New Issue
Block a user