Skip to content

Commit

Permalink
Merge pull request #231 from tristanmorgan/no-ioutil
Browse files Browse the repository at this point in the history
Remove deprecated ioutil.
  • Loading branch information
skpratt authored Oct 30, 2023
2 parents ede9cf9 + f8f2b8d commit 0309b96
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 0309b96

Please sign in to comment.