@@ -42,7 +42,7 @@ func mod(
4242}
4343
4444func TestWithTyped_DefaultAndParse (t * testing.T ) {
45- const token module.Token = "config.jwt_ttl"
45+ const token module.Token = "config.jwt_ttl" //nolint:gosec
4646 def := 1 * time .Hour
4747
4848 cfgModule := config .NewModule (
@@ -76,7 +76,7 @@ func TestWithTyped_DefaultAndParse(t *testing.T) {
7676}
7777
7878func TestWithTyped_UsesDefaultWhenUnset (t * testing.T ) {
79- const token module.Token = "config.http_addr"
79+ const token module.Token = "config.http_addr" //nolint:gosec
8080 def := ":8080"
8181
8282 cfgModule := config .NewModule (
@@ -105,7 +105,7 @@ func TestWithTyped_UsesDefaultWhenUnset(t *testing.T) {
105105}
106106
107107func TestWithTyped_OptionalUnsetReturnsZeroWithoutParsing (t * testing.T ) {
108- const token module.Token = "config.optional_int"
108+ const token module.Token = "config.optional_int" //nolint:gosec
109109 called := false
110110
111111 cfgModule := config .NewModule (
@@ -145,7 +145,7 @@ func TestWithTyped_OptionalUnsetReturnsZeroWithoutParsing(t *testing.T) {
145145}
146146
147147func TestWithTyped_MissingRequired (t * testing.T ) {
148- const token module.Token = "config.jwt_secret"
148+ const token module.Token = "config.jwt_secret" //nolint:gosec
149149
150150 cfgModule := config .NewModule (
151151 config .WithSource (mapSource {}),
@@ -187,7 +187,7 @@ func TestWithTyped_MissingRequired(t *testing.T) {
187187}
188188
189189func TestWithTyped_ParseError (t * testing.T ) {
190- const token module.Token = "config.rate_limit_burst"
190+ const token module.Token = "config.rate_limit_burst" //nolint:gosec
191191
192192 cfgModule := config .NewModule (
193193 config .WithSource (mapSource {"RATE_LIMIT_BURST" : "NaN" }),
@@ -223,7 +223,7 @@ func TestWithTyped_ParseError(t *testing.T) {
223223
224224func TestWithTyped_InvalidSpec (t * testing.T ) {
225225 t .Run ("empty key" , func (t * testing.T ) {
226- const token module.Token = "config.foo"
226+ const token module.Token = "config.foo" //nolint:gosec
227227 cfgModule := config .NewModule (
228228 config .WithSource (mapSource {"X" : "1" }),
229229 config .WithTyped (token , config.ValueSpec [int ]{
@@ -276,7 +276,7 @@ func TestWithTyped_InvalidSpec(t *testing.T) {
276276}
277277
278278func TestWithTyped_SensitiveErrorDoesNotLeakValue (t * testing.T ) {
279- const token module.Token = "config.jwt_secret"
279+ const token module.Token = "config.jwt_secret" //nolint:gosec
280280
281281 cfgModule := config .NewModule (
282282 config .WithSource (mapSource {"JWT_SECRET" : "super-secret-value" }),
@@ -305,7 +305,7 @@ func TestWithTyped_SensitiveErrorDoesNotLeakValue(t *testing.T) {
305305}
306306
307307func TestWithSourceNil (t * testing.T ) {
308- const token module.Token = "config.foo"
308+ const token module.Token = "config.foo" //nolint:gosec
309309
310310 cfgModule := config .NewModule (
311311 config .WithSource (nil ),
@@ -334,7 +334,7 @@ func TestWithSourceNil(t *testing.T) {
334334}
335335
336336func TestNoReflectionMagic_CustomParser (t * testing.T ) {
337- const token module.Token = "config.custom"
337+ const token module.Token = "config.custom" //nolint:gosec
338338
339339 parseCustom := func (raw string ) (string , error ) {
340340 if raw != "expected" {
0 commit comments