MCPcopy
hub / github.com/sourcegraph/checkup / toJSON

Function toJSON

storage/github/github_test.go:38–44  ·  view source on GitHub ↗
(data interface{})

Source from the content-addressed store, hash-verified

36}
37
38func toJSON(data interface{}) []byte {
39 encoded, err := json.Marshal(data)
40 if err != nil {
41 panic(err)
42 }
43 return encoded
44}
45
46func sha(data []byte) string {
47 return fmt.Sprintf("%x", sha1.Sum(data))

Callers 2

repositoryContentFunction · 0.85
withGitHubServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected