Skip to content

Commit

Permalink
build: Add tenv linter.
Browse files Browse the repository at this point in the history
This adds the tenv linter to the list of linters and addresses an
instance it complains about.
  • Loading branch information
davecgh committed Aug 21, 2024
1 parent bd6e4f4 commit 59ded0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ linters:
- nosprintfhostport
- reassign
- rowserrcheck
- tenv
- tparallel
- typecheck
- unconvert
Expand Down
4 changes: 2 additions & 2 deletions config_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2018-2023 The Decred developers
// Copyright (c) 2018-2024 The Decred developers
// Use of this source code is governed by an ISC
// license that can be found in the LICENSE file.

Expand Down Expand Up @@ -61,7 +61,7 @@ func TestDefaultAltDNSNames(t *testing.T) {
func TestAltDNSNamesWithEnv(t *testing.T) {
appName := filepath.Base(os.Args[0])
appName = strings.TrimSuffix(appName, filepath.Ext(appName))
os.Setenv("DCRD_ALT_DNSNAMES", "hostname1,hostname2")
t.Setenv("DCRD_ALT_DNSNAMES", "hostname1,hostname2")
cfg, _, err := loadConfig(appName)
if err != nil {
t.Fatalf("Failed to load dcrd config: %s", err)
Expand Down

0 comments on commit 59ded0b

Please sign in to comment.