Skip to content

Commit a2476dc

Browse files
committed
remove assignment to a nil map
1 parent bd6f3ed commit a2476dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

enterprise/coderd/provisionerdaemons.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ func provisionerTags(r *http.Request) map[string]string {
9898
return nil
9999
}
100100

101-
var tagMap map[string]string
101+
tagMap := map[string]string{}
102102
for _, tag := range tags {
103103
parts := strings.SplitN(tag, "=", 2)
104104
if len(parts) == 2 {
105+
// TODO(sas): seems like the kind of place where nilpointers would pop up.
105106
tagMap[parts[0]] = parts[1]
106107
}
107108
}

0 commit comments

Comments
 (0)