Closed gh0st42 closed 5 years ago
The example for the bundle builder is not uptodate: https://godoc.org/github.com/dtn7/dtn7/bundle#BundleBuilder
bndl, err := bundle.Builder(). CRC(bundle.CRC32). Source("dtn://src/"). Destination("dtn://dest/"). CreationTimestampNow(). Lifetime("30m"). HopCountBlock(64). PayloadBlock("hello world!"). Build()
This leads to an error: binary.Write: invalid type string
binary.Write: invalid type string
The problem is the PayloadBlock which is given a string but needs a byte slice(e.g. []byte("hello world")
[]byte("hello world")
Thanks!
The example for the bundle builder is not uptodate: https://godoc.org/github.com/dtn7/dtn7/bundle#BundleBuilder
This leads to an error:
binary.Write: invalid type string
The problem is the PayloadBlock which is given a string but needs a byte slice(e.g.
[]byte("hello world")