Skip to content

Commit

Permalink
clone events
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 23, 2024
1 parent 6706d94 commit cb8d141
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/closter/events/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/vinceanalytics/vince/internal/logger"
"github.com/vinceanalytics/vince/internal/ref"
"github.com/vinceanalytics/vince/ua"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/timestamppb"
)

Expand Down Expand Up @@ -163,3 +164,9 @@ func uniqueID(remoteIP, userAgent, domain, host string) (sum uint64) {
sum = h.Sum64()
return
}

func Clone(e *v1.Data) *v1.Data {
o := One()
proto.Merge(o, e)
return o
}

0 comments on commit cb8d141

Please sign in to comment.