Skip to content

Commit feb57ae

Browse files
committed
fix lock copying
1 parent edd317a commit feb57ae

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

cmd/gtrace/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func main() {
105105
log.Printf("package files: %v", buildPkg.GoFiles)
106106
}
107107

108-
var writers []Writer
108+
var writers []*Writer
109109
if isGoGenerate || write {
110110
// We should support Go suffixes like `_linux.go` properly.
111111
name, tags, ext := splitOSArchTags(&buildCtx, gofile)
@@ -128,23 +128,23 @@ func main() {
128128
}
129129
f, clean := openFile(name + suffix + tags + ext)
130130
defer clean()
131-
writers = append(writers, Writer{
131+
writers = append(writers, &Writer{
132132
Context: buildCtx,
133133
Output: f,
134134
BuildTag: buildTag,
135135
})
136136
if buildTag != "" {
137137
f, clean := openFile(name + suffix + stubSuffix + tags + ext)
138138
defer clean()
139-
writers = append(writers, Writer{
139+
writers = append(writers, &Writer{
140140
Context: buildCtx,
141141
Output: f,
142142
BuildTag: buildTag,
143143
Stub: true,
144144
})
145145
}
146146
} else {
147-
writers = append(writers, Writer{
147+
writers = append(writers, &Writer{
148148
Context: buildCtx,
149149
Output: os.Stdout,
150150
BuildTag: buildTag,

0 commit comments

Comments
 (0)