File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ type EventUnmarshaler interface {
36
36
UnmarshalEvent (Annotations ) (Event , error )
37
37
}
38
38
39
- const schemaPrefix = "_schema:"
39
+ const SchemaPrefix = "_schema:"
40
40
41
41
// MarshalEvent marshals an event into annotations.
42
42
func MarshalEvent (e Event ) (Annotations , error ) {
@@ -46,15 +46,15 @@ func MarshalEvent(e Event) (Annotations, error) {
46
46
if err != nil {
47
47
return nil , err
48
48
}
49
- as = append (as , Annotation {Key : schemaPrefix + e .Schema ()})
49
+ as = append (as , Annotation {Key : SchemaPrefix + e .Schema ()})
50
50
return as , nil
51
51
}
52
52
53
53
var as Annotations
54
54
flattenValue ("" , reflect .ValueOf (e ), func (k , v string ) {
55
55
as = append (as , Annotation {Key : k , Value : []byte (v )})
56
56
})
57
- as = append (as , Annotation {Key : schemaPrefix + e .Schema ()})
57
+ as = append (as , Annotation {Key : SchemaPrefix + e .Schema ()})
58
58
return as , nil
59
59
}
60
60
Original file line number Diff line number Diff line change @@ -206,8 +206,8 @@ func (as Annotations) String() string {
206
206
func (as Annotations ) schemas () []string {
207
207
var schemas []string
208
208
for _ , a := range as {
209
- if strings .HasPrefix (a .Key , schemaPrefix ) {
210
- schemas = append (schemas , a .Key [len (schemaPrefix ):])
209
+ if strings .HasPrefix (a .Key , SchemaPrefix ) {
210
+ schemas = append (schemas , a .Key [len (SchemaPrefix ):])
211
211
}
212
212
}
213
213
return schemas
You can’t perform that action at this time.
0 commit comments