@ -1216,7 +1216,7 @@ func processImportCfg(flags []string) (newImportCfg string, _ error) {
// See exporttest/*.go in testdata/scripts/test.txt.
// See exporttest/*.go in testdata/scripts/test.txt.
// For now, spot the pattern and avoid the unnecessary error;
// For now, spot the pattern and avoid the unnecessary error;
// the dependency is unused, so the packagefile line is redundant.
// the dependency is unused, so the packagefile line is redundant.
// This still triggers as of go1. 19beta1 .
// This still triggers as of go1. 20 .
if strings . HasSuffix ( curPkg . ImportPath , ".test]" ) && strings . HasPrefix ( curPkg . ImportPath , impPath ) {
if strings . HasSuffix ( curPkg . ImportPath , ".test]" ) && strings . HasPrefix ( curPkg . ImportPath , impPath ) {
continue
continue
}
}
@ -1935,12 +1935,6 @@ func (tf *transformer) transformGoFile(file *ast.File) *ast.File {
return true
return true
}
}
// TODO(mvdan): investigate obfuscating these too.
filename := fset . Position ( obj . Pos ( ) ) . Filename
if strings . HasPrefix ( filename , "_cgo_" ) || strings . Contains ( filename , ".cgo1." ) {
return true
}
lpkg , err := listPackage ( path )
lpkg , err := listPackage ( path )
if err != nil {
if err != nil {
panic ( err ) // shouldn't happen
panic ( err ) // shouldn't happen