Skip to content

Commit c1c953f

Browse files
author
Stephen Gutekanst
committed
expose s/schemaPrefix/SchemaPrefix/g
1 parent 828d45a commit c1c953f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

event.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type EventUnmarshaler interface {
3636
UnmarshalEvent(Annotations) (Event, error)
3737
}
3838

39-
const schemaPrefix = "_schema:"
39+
const SchemaPrefix = "_schema:"
4040

4141
// MarshalEvent marshals an event into annotations.
4242
func MarshalEvent(e Event) (Annotations, error) {
@@ -46,15 +46,15 @@ func MarshalEvent(e Event) (Annotations, error) {
4646
if err != nil {
4747
return nil, err
4848
}
49-
as = append(as, Annotation{Key: schemaPrefix + e.Schema()})
49+
as = append(as, Annotation{Key: SchemaPrefix + e.Schema()})
5050
return as, nil
5151
}
5252

5353
var as Annotations
5454
flattenValue("", reflect.ValueOf(e), func(k, v string) {
5555
as = append(as, Annotation{Key: k, Value: []byte(v)})
5656
})
57-
as = append(as, Annotation{Key: schemaPrefix + e.Schema()})
57+
as = append(as, Annotation{Key: SchemaPrefix + e.Schema()})
5858
return as, nil
5959
}
6060

span.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ func (as Annotations) String() string {
206206
func (as Annotations) schemas() []string {
207207
var schemas []string
208208
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):])
211211
}
212212
}
213213
return schemas

0 commit comments

Comments
 (0)