Skip to content

Commit 7c16daf

Browse files
committed
chore: enable unlambda rule from go-critic
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 1953d24 commit 7c16daf

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ linters:
1515
enable-all: true
1616
disabled-checks:
1717
- hugeParam
18-
- unlambda
1918
revive:
2019
rules:
2120
- name: unused-parameter

config/config.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,7 @@ func (re *Regexp) UnmarshalYAML(unmarshal func(interface{}) error) error {
361361
}
362362

363363
func substituteEnvVariables(value string) (string, error) {
364-
result := os.Expand(value, func(s string) string {
365-
return os.Getenv(s)
366-
})
364+
result := os.Expand(value, os.Getenv)
367365
if result == "" {
368366
return "", errors.New(value + " environment variable not found")
369367
}

0 commit comments

Comments
 (0)