Skip to content

Commit 667ffd6

Browse files
committed
Fix nil assignment
1 parent 56ec679 commit 667ffd6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/templatevariables.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ func parseVariableValuesFromHCL(content []byte) ([]codersdk.VariableValue, error
112112
return nil, diags
113113
}
114114

115-
var stringData map[string]string
115+
stringData := map[string]string{}
116116
for _, attribute := range attrs {
117117
ctyValue, diags := attribute.Expr.Value(nil)
118118
if diags.HasErrors() {
@@ -142,7 +142,7 @@ func parseVariableValuesFromJSON(content []byte) ([]codersdk.VariableValue, erro
142142
return nil, err
143143
}
144144

145-
stringData := make(map[string]string)
145+
stringData := map[string]string{}
146146
for key, value := range data {
147147
switch value.(type) {
148148
case string, int, bool:

0 commit comments

Comments
 (0)