"go:cgo_ldflag": true,
"go:cgo_dynamic_linker": true,
"go:embed": true,
+ "go:fix": true,
"go:generate": true,
}
//
// Deprecated: Use [ForCompiler], which populates a FileSet
// with the positions of objects created by the importer.
+//
+//go:fix inline
func For(compiler string, lookup Lookup) types.Importer {
return ForCompiler(token.NewFileSet(), compiler, lookup)
}
// must be of unnamed slice type.
//
// Deprecated: Use [NewSignatureType] instead which allows for type parameters.
+//
+//go:fix inline
func NewSignature(recv *Var, params, results *Tuple, variadic bool) *Signature {
return NewSignatureType(recv, nil, nil, params, results, variadic)
}
// as an error to be reported.
//
// Deprecated: As of Go 1.16, this function simply calls [io.ReadAll].
+//
+//go:fix inline
func ReadAll(r io.Reader) ([]byte, error) {
return io.ReadAll(r)
}
// to be reported.
//
// Deprecated: As of Go 1.16, this function simply calls [os.ReadFile].
+//
+//go:fix inline
func ReadFile(filename string) ([]byte, error) {
return os.ReadFile(filename)
}
// (before umask); otherwise WriteFile truncates it before writing, without changing permissions.
//
// Deprecated: As of Go 1.16, this function simply calls [os.WriteFile].
+//
+//go:fix inline
func WriteFile(filename string, data []byte, perm fs.FileMode) error {
return os.WriteFile(filename, data, perm)
}
// the provided Reader r.
//
// Deprecated: As of Go 1.16, this function simply calls [io.NopCloser].
+//
+//go:fix inline
func NopCloser(r io.Reader) io.ReadCloser {
return io.NopCloser(r)
}
// to remove the file when no longer needed.
//
// Deprecated: As of Go 1.17, this function simply calls [os.CreateTemp].
+//
+//go:fix inline
func TempFile(dir, pattern string) (f *os.File, err error) {
return os.CreateTemp(dir, pattern)
}
// to remove the directory when no longer needed.
//
// Deprecated: As of Go 1.17, this function simply calls [os.MkdirTemp].
+//
+//go:fix inline
func TempDir(dir, pattern string) (name string, err error) {
return os.MkdirTemp(dir, pattern)
}
)
// Ptr is the old name for the [Pointer] kind.
+//
+//go:fix inline
const Ptr = Pointer
// uncommonType is present only for defined types or types with methods
// The two functions behave identically.
//
// Deprecated: Superseded by [PointerTo].
+//
+//go:fix inline
func PtrTo(t Type) Type { return PointerTo(t) }
// PointerTo returns the pointer type with element t.