8000 Use os.ReadFile · coder/coder@e69ae31 · GitHub
[go: up one dir, main page]

Skip to content

Commit e69ae31

Browse files
committed
Use os.ReadFile
1 parent b35b7b3 commit e69ae31

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

cli/create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package cli
22

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"os"
66
"time"
77

88
"github.com/spf13/cobra"
@@ -123,7 +123,7 @@ func create() *cobra.Command {
123123
parameterValues := make(map[string]string)
124124

125125
if parameterFile != "" {
126-
parameterFileContents, err := ioutil.ReadFile(parameterFile)
126+
parameterFileContents, err := os.ReadFile(parameterFile)
127127

128128
if err != nil {
129129
return err

cli/templatecreate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cli
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"os"
76
"path/filepath"
87
"sort"
@@ -192,7 +191,7 @@ func createValidTemplateVersion(cmd *cobra.Command, client *codersdk.Client, org
192191
parameterValuesFromFile := make(map[string]string)
193192
if parameterFile != "" {
194193
_, _ = fmt.Fprintln(cmd.OutOrStdout(), cliui.Styles.Paragraph.Render("Attempting to read the variables from the parameter file.")+"\r\n")
195-
parameterFileContents, err := ioutil.ReadFile(parameterFile)
194+
parameterFileContents, err := os.ReadFile(parameterFile)
196195

197196
if err != nil {
198197
return nil, nil, err

0 commit comments

Comments
 (0)
0