MCPcopy Create free account
hub / github.com/evilsocket/sum / WrapRecord

Function WrapRecord

wrapper/record.go:27–34  ·  view source on GitHub ↗

WrapRecord creates a Record wrapper around a raw *pb.Record object.

(record *pb.Record)

Source from the content-addressed store, hash-verified

25
26// WrapRecord creates a Record wrapper around a raw *pb.Record object.
27func WrapRecord(record *pb.Record) *Record {
28 w := &Record{record: record}
29 if record != nil {
30 w.ID = record.Id
31 w.SetData(record.Data)
32 }
33 return w
34}
35
36func (w *Record) SetData(data []float32) {
37 w.record.Data = data

Calls 1

SetDataMethod · 0.95