import "github.com/ipfs/go-ipfs/unixfs/pb" // create a new UnixFS data node dataNode := &unixfs_pb.Data{ Data: []byte("hello world"), }
import "github.com/ipfs/go-ipfs/unixfs/pb" // create a UnixFS node from some serialized protobuf data serializedData := []byte{...} node, err := unixfs_pb.DataFromBytes(serializedData) if err != nil { panic(err) } // retrieve the data from the UnixFS node data := node.GetData() fmt.Println(string(data))Overall, the go github.com.ipfs.go-ipfs.unixfs.pb Data package is a useful library for working with UnixFS data in the IPFS ecosystem.