bmdb/reflection: expose Tags as pointers, as its methods have pointer receivers
Change-Id: I6ab972f37735409e089b8a3c3c088375c4b210c6
Reviewed-on: https://review.monogon.dev/c/monogon/+/1133
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/cloud/bmaas/bmdb/reflection/reflection.go b/cloud/bmaas/bmdb/reflection/reflection.go
index 19bc40a..848c924 100644
--- a/cloud/bmaas/bmdb/reflection/reflection.go
+++ b/cloud/bmaas/bmdb/reflection/reflection.go
@@ -184,7 +184,7 @@
machine = &Machine{
ID: mid,
Created: machineCreated,
- Tags: make(map[string]Tag),
+ Tags: make(map[string]*Tag),
Backoffs: make(map[string]Backoff),
Work: make(map[string]Work),
}
@@ -198,7 +198,7 @@
for _, f := range st.fields {
fields = append(fields, *f)
}
- machine.Tags[st.ty.Name()] = Tag{
+ machine.Tags[st.ty.Name()] = &Tag{
Type: st.ty,
Fields: fields,
}
@@ -253,7 +253,7 @@
Created time.Time
// Tags on this machine, keyed by Tag type name (canonical, not native).
- Tags map[string]Tag
+ Tags map[string]*Tag
// Backoffs on this machine, keyed by process name. By default these are only
// active backoffs, unless ExpiredBackoffs was set on GetMachineOptions.