decred.org/dcrwallet/v3@v3.1.0/wallet/main_test.go (about) 1 // Copyright (c) 2020 The Decred developers 2 // Use of this source code is governed by an ISC 3 // license that can be found in the LICENSE file. 4 5 package wallet 6 7 import ( 8 "flag" 9 "os" 10 "testing" 11 12 "github.com/decred/slog" 13 ) 14 15 var logFlag = flag.Bool("log", false, "enable package logger") 16 17 func TestMain(m *testing.M) { 18 flag.Parse() 19 if *logFlag { 20 UseLogger(slog.NewBackend(os.Stderr).Logger("WLLT")) 21 } 22 23 os.Exit(m.Run()) 24 }