Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions provisionersdk/provisionertags.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ const (
// NOTE: "owner" must NEVER be nil. Otherwise it will end up being
// duplicated in the database, as idx_provisioner_daemons_name_owner_key
// is a partial unique index that includes a JSON field.
func MutateTags(userID uuid.UUID, tags map[string]string) map[string]string {
if tags == nil {
tags = map[string]string{}
func MutateTags(userID uuid.UUID, provided map[string]string) map[string]string {
tags := map[string]string{}
for k, v := range provided {
tags[k] = v
}
_, ok := tags[TagScope]
if !ok {
Expand Down
Loading