Skip to content

Commit c7bb16f

Browse files
committed
Use os.ReadFile
1 parent 8de16f8 commit c7bb16f

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy