Fix direct access to trap.Writer from trap.Labeler

This commit is contained in:
Gustav
2022-11-11 18:39:25 +01:00
committed by GitHub
parent fea4b816af
commit 3514694cdf

View File

@@ -57,7 +57,7 @@ func (l *Labeler) GlobalID(key string) Label {
label, exists := l.keyLabels[key]
if !exists {
id := l.nextID()
fmt.Fprintf(l.tw.zip, "%s=@\"%s\"\n", id, escapeString(key))
fmt.Fprintf(l.tw.wzip, "%s=@\"%s\"\n", id, escapeString(key))
label = Label{id}
l.keyLabels[key] = label
}
@@ -90,7 +90,7 @@ func (l *Labeler) LocalID(nd interface{}) Label {
// FreshID creates a fresh label and returns it
func (l *Labeler) FreshID() Label {
id := l.nextID()
fmt.Fprintf(l.tw.zip, "%s=*\n", id)
fmt.Fprintf(l.tw.wzip, "%s=*\n", id)
return Label{id}
}