MCPcopy Index your code
hub / github.com/bitfield/script / ExamplePipe_Hash

Function ExamplePipe_Hash

script_test.go:2441–2449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2439}
2440
2441func ExamplePipe_Hash() {
2442 sum, err := script.Echo("hello world").Hash(sha512.New())
2443 if err != nil {
2444 panic(err)
2445 }
2446 fmt.Println(sum)
2447 // Output:
2448 // 309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f
2449}
2450
2451func ExamplePipe_HashSums() {
2452 script.ListFiles("testdata/multiple_files").HashSums(sha256.New()).Stdout()

Callers

nothing calls this directly

Calls 2

EchoFunction · 0.92
HashMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…