github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/go/internal/gcimporter/exportdata.go (about)

     1  // Copyright 2011 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  // This file implements FindExportData.
     6  
     7  package gcimporter
     8  
     9  import (
    10  	"github.com/shogo82148/std/bufio"
    11  )
    12  
    13  // FindExportData positions the reader r at the beginning of the
    14  // export data section of an underlying GC-created object/archive
    15  // file by reading from it. The reader must be positioned at the
    16  // start of the file before calling this function. The hdr result
    17  // is the string before the export data, either "$$" or "$$B".
    18  func FindExportData(r *bufio.Reader) (hdr string, size int, err error)