github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/internal/coverage/encodemeta/encodefile.go (about)

     1  // Copyright 2021 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package encodemeta
     6  
     7  import (
     8  	"github.com/shogo82148/std/bufio"
     9  	"github.com/shogo82148/std/internal/coverage"
    10  	"github.com/shogo82148/std/internal/coverage/stringtab"
    11  	"github.com/shogo82148/std/io"
    12  )
    13  
    14  type CoverageMetaFileWriter struct {
    15  	stab   stringtab.Writer
    16  	mfname string
    17  	w      *bufio.Writer
    18  	tmp    []byte
    19  	debug  bool
    20  }
    21  
    22  func NewCoverageMetaFileWriter(mfname string, w io.Writer) *CoverageMetaFileWriter
    23  
    24  func (m *CoverageMetaFileWriter) Write(finalHash [16]byte, blobs [][]byte, mode coverage.CounterMode, granularity coverage.CounterGranularity) error