MCPcopy Index your code
hub / github.com/coder/coder / checksumFileCRC32

Function checksumFileCRC32

provisioner/terraform/executor.go:281–288  ·  view source on GitHub ↗
(ctx context.Context, logger slog.Logger, path string)

Source from the content-addressed store, hash-verified

279}
280
281func checksumFileCRC32(ctx context.Context, logger slog.Logger, path string) uint32 {
282 content, err := os.ReadFile(path)
283 if err != nil {
284 logger.Debug(ctx, "file does not exist or can't be read, skip checksum calculation", slog.F("path", path))
285 return 0
286 }
287 return crc32.ChecksumIEEE(content)
288}
289
290// revive:disable-next-line:flag-parameter
291func (e *executor) plan(ctx, killCtx context.Context, env, vars []string, logr logSink, req *proto.PlanRequest) (*proto.PlanComplete, error) {

Callers 2

initMethod · 0.85
TestChecksumFileCRC32Function · 0.85

Calls 1

ReadFileMethod · 0.65

Tested by 1

TestChecksumFileCRC32Function · 0.68