@ -719,61 +719,77 @@ func (tf *transformer) handleDirectives(comments []string) {
// Once we support go:linkname well and once we can obfuscate the runtime
// package, this entire map can likely go away.
//
// The list was obtained via scripts/runtime-related.sh on Go 1.1 5.5 .
// The list was obtained via scripts/runtime-related.sh on Go 1.1 6 .
var runtimeRelated = map [ string ] bool {
"bufio" : true ,
"bytes" : true ,
"compress/flate" : true ,
"compress/gzip" : true ,
"context" : true ,
"encoding/binary" : true ,
"errors" : true ,
"fmt" : true ,
"hash" : true ,
"hash/crc32" : true ,
"internal/bytealg" : true ,
"internal/cpu" : true ,
"internal/fmtsort" : true ,
"internal/oserror" : true ,
"internal/poll" : true ,
"internal/race" : true ,
"internal/reflectlite" : true ,
"internal/syscall/execenv" : true ,
"internal/syscall/unix" : true ,
"internal/syscall/windows" : true ,
"internal/syscall/windows/registry" : true ,
"internal/syscall/windows/sysdll" : true ,
"internal/testlog" : true ,
"internal/unsafeheader" : true ,
"io" : true ,
"io/ioutil" : true ,
"math" : true ,
"math/bits" : true ,
"os" : true ,
"os/signal" : true ,
"path/filepath" : true ,
"plugin" : true ,
"reflect" : true ,
"runtime" : true ,
"runtime/cgo" : true ,
"runtime/debug" : true ,
"runtime/internal/atomic" : true ,
"runtime/internal/math" : true ,
"runtime/internal/sys" : true ,
"runtime/pprof" : true ,
"runtime/trace" : true ,
"sort" : true ,
"strconv" : true ,
"strings" : true ,
"sync" : true ,
"sync/atomic" : true ,
"syscall" : true ,
"text/tabwriter" : true ,
"time" : true ,
"unicode" : true ,
"unicode/utf16" : true ,
"unicode/utf8" : true ,
"unsafe" : true ,
"bufio" : true ,
"bytes" : true ,
"compress/flate" : true ,
"compress/gzip" : true ,
"context" : true ,
"crypto/x509/internal/macos" : true ,
"encoding/binary" : true ,
"errors" : true ,
"fmt" : true ,
"hash" : true ,
"hash/crc32" : true ,
"internal/bytealg" : true ,
"internal/cpu" : true ,
"internal/fmtsort" : true ,
"internal/nettrace" : true ,
"internal/oserror" : true ,
"internal/poll" : true ,
"internal/race" : true ,
"internal/reflectlite" : true ,
"internal/singleflight" : true ,
"internal/syscall/execenv" : true ,
"internal/syscall/unix" : true ,
"internal/syscall/windows" : true ,
"internal/syscall/windows/registry" : true ,
"internal/syscall/windows/sysdll" : true ,
"internal/testlog" : true ,
"internal/unsafeheader" : true ,
"io" : true ,
"io/fs" : true ,
"math" : true ,
"math/bits" : true ,
"net" : true ,
"os" : true ,
"os/signal" : true ,
"path" : true ,
"plugin" : true ,
"reflect" : true ,
"runtime" : true ,
"runtime/cgo" : true ,
"runtime/debug" : true ,
"runtime/internal/atomic" : true ,
"runtime/internal/math" : true ,
"runtime/internal/sys" : true ,
"runtime/metrics" : true ,
"runtime/pprof" : true ,
"runtime/trace" : true ,
"sort" : true ,
"strconv" : true ,
"strings" : true ,
"sync" : true ,
"sync/atomic" : true ,
"syscall" : true ,
"text/tabwriter" : true ,
"time" : true ,
"unicode" : true ,
"unicode/utf16" : true ,
"unicode/utf8" : true ,
"unsafe" : true ,
"vendor/golang.org/x/net/dns/dnsmessage" : true ,
"vendor/golang.org/x/net/route" : true ,
// These packages were moved in Go 1.16, but 1.15's runtime still
// linknames to them.
"io/ioutil" : true ,
"path/filepath" : true ,
// Go 1.15's "net" package depends on "math/rand", but 1.16's does not.
// Keep it here to support 1.15.
"math/rand" : true ,
}
// isPrivate checks if GOPRIVATE matches path.