MCPcopy Create free account
hub / github.com/chrislusf/glow / ExecutableFileHash

Method ExecutableFileHash

driver/rsync/http_server.go:57–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57func (rs *RsyncServer) ExecutableFileHash() string {
58 if len(rs.fileHashes) == 0 {
59 return ""
60 }
61 hash := rs.fileHashes[0].Hash
62 src := make([]byte, 4)
63 dest := make([]byte, 8)
64 util.Uint32toBytes(src, hash)
65 hex.Encode(dest, src)
66 return string(dest)
67}
68
69func (rs *RsyncServer) listHandler(w http.ResponseWriter, r *http.Request) {
70 util.Json(w, r, http.StatusAccepted, ListFileResult{rs.fileHashes})

Callers 1

RunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected