MCPcopy
hub / github.com/hashicorp/packer / Close

Method Close

post-processor/compress/benchmark.go:31–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31func (c *Compressor) Close() error {
32 var err error
33
34 fi, _ := c.w.Stat()
35 c.sw = fi.Size()
36 if err = c.w.Close(); err != nil {
37 return err
38 }
39
40 fi, _ = c.r.Stat()
41 c.sr = fi.Size()
42 if err = c.r.Close(); err != nil {
43 return err
44 }
45
46 return nil
47}
48
49func NewCompressor(src, dst string) (*Compressor, error) {
50 r, err := os.Open(src)

Callers 12

mainFunction · 0.95
TestChecksumSHA1Function · 0.45
PostProcessMethod · 0.45
NewCompressorFunction · 0.45
BenchmarkGZIPWriterMethod · 0.45
BenchmarkPGZIPWriterMethod · 0.45
BenchmarkLZ4WriterMethod · 0.45
BenchmarkXZWriterMethod · 0.45
TestArchiveFunction · 0.45
PostProcessMethod · 0.45
createTarArchiveFunction · 0.45
createZipArchiveFunction · 0.45

Calls

no outgoing calls

Tested by 2

TestChecksumSHA1Function · 0.36
TestArchiveFunction · 0.36