Skip to content

Commit

Permalink
Remove deprecated ioutil.
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanmorgan committed Sep 7, 2023
1 parent fae342d commit f8f2b8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package main
import (
"fmt"
"io"
"io/ioutil"
"os"
"reflect"
"strings"
Expand Down Expand Up @@ -245,7 +244,7 @@ var configDecodeHook = mapstructure.ComposeDecodeHookFunc(
// configuration struct
func DecodeConfig(r io.Reader) (*HumanConfig, error) {
// Parse the file (could be HCL or JSON)
bytes, err := ioutil.ReadAll(r)
bytes, err := io.ReadAll(r)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ package main

import (
"fmt"
"io/ioutil"
"log"
"io"
"os"
"reflect"
"strings"
Expand All @@ -18,7 +18,7 @@ import (
)

// Change as needed to see log/consul-agent output
var output = ioutil.Discard
var output = io.Discard
var LOGOUT = output
var STDOUT = output
var STDERR = output
Expand Down

0 comments on commit f8f2b8d

Please sign in to comment.