MCPcopy Create free account
hub / github.com/Tylous/SourcePoint / Writefile

Function Writefile

Utils/Utils.go:34–40  ·  view source on GitHub ↗
(outFile, result string)

Source from the content-addressed store, hash-verified

32}
33
34func Writefile(outFile, result string) {
35 cf, err := os.OpenFile(outFile, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
36 check(err)
37 defer cf.Close()
38 _, err = cf.Write([]byte(result))
39 check(err)
40}
41
42func generateRandomBytes(n int) ([]byte, error) {
43 b := make([]byte, n)

Callers 1

BuildFunction · 0.92

Calls 1

checkFunction · 0.85

Tested by

no test coverage detected