Skip to content

Commit

Permalink
Change ioutil.Discard to use func in io for #148
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed May 21, 2024
1 parent aed027f commit 9a7af50
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"math/rand"
flag "mflag"
Expand Down Expand Up @@ -859,8 +858,8 @@ func usage() {
func initLoggers() {
logFatal = log.New(os.Stderr, "FATAL: ", log.Lshortfile)
errorHandle := os.Stderr
infoHandle := ioutil.Discard
benchmarkHandle := ioutil.Discard
infoHandle := io.Discard
benchmarkHandle := io.Discard
if *logfile != "" {
lgf, err := os.OpenFile(*logfile, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
Expand Down

0 comments on commit 9a7af50

Please sign in to comment.