Skip to content

Commit aa1d9b0

Browse files
committed
simplify the DONE event
1 parent 9933435 commit aa1d9b0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

stream_v2.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ type StreamRawEvent struct {
1111
}
1212

1313
type StreamDone struct {
14-
Data string // [DONE]
1514
}
1615

1716
// Define StreamThreadMessageDelta
@@ -134,7 +133,7 @@ func (s *StreamerV2) Next() bool {
134133

135134
}
136135
case "done":
137-
s.next = StreamDone{Data: "DONE"}
136+
s.next = StreamDone{}
138137
default:
139138
s.next = StreamRawEvent{
140139
Type: event.Event,

stream_v2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ data: [DONE]
9393
},
9494
},
9595
},
96-
StreamDone{Data: "DONE"},
96+
StreamDone{},
9797
}
9898

9999
if len(events) != len(expectedValues) {

0 commit comments

Comments
 (0)