github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/go/internal/gcimporter/testdata/versions/test.go (about)

     1  // Copyright 2016 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 is a copy of $GOROOT/src/go/internal/gcimporter/testdata/versions.test.go.
     6  
     7  // To create a test case for a new export format version,
     8  // build this package with the latest compiler and store
     9  // the resulting .a file appropriately named in the versions
    10  // directory. The VersionHandling test will pick it up.
    11  //
    12  // In the testdata/versions:
    13  //
    14  // go build -o test_go1.$X_$Y.a test.go
    15  //
    16  // with $X = Go version and $Y = export format version
    17  // (add 'b' or 'i' to distinguish between binary and
    18  // indexed format starting with 1.11 as long as both
    19  // formats are supported).
    20  //
    21  // Make sure this source is extended such that it exercises
    22  // whatever export format change has taken place.
    23  
    24  package test
    25  
    26  // Any release before and including Go 1.7 didn't encode
    27  // the package for a blank struct field.
    28  type BlankField struct {
    29  	_ int
    30  }