MCPcopy Create free account
hub / github.com/Jeiwan/blockchain_go / bytesToCommand

Function bytesToCommand

server.go:70–80  ·  view source on GitHub ↗
(bytes []byte)

Source from the content-addressed store, hash-verified

68}
69
70func bytesToCommand(bytes []byte) string {
71 var command []byte
72
73 for _, b := range bytes {
74 if b != 0x0 {
75 command = append(command, b)
76 }
77 }
78
79 return fmt.Sprintf("%s", command)
80}
81
82func extractCommand(request []byte) []byte {
83 return request[:commandLength]

Callers 1

handleConnectionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected