typesutil

package
v1.7.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetErrorGo116 added in v1.5.2

func GetErrorGo116(err *types.Error) (code int, start, end token.Pos, ok bool)

GetErrorGo116 extracts the go116 fields from types.Error

func ScopeDelete

func ScopeDelete(s *types.Scope, name string) types.Object

ScopeDelete deletes an object from specified scope by its name.

func SetErrorGo116

func SetErrorGo116(ret *types.Error, code int, start, end token.Pos)

Types

type Error

type Error struct {
	Fset *token.FileSet // file set for interpretation of Pos
	Pos  token.Pos      // error position
	Msg  string         // error message
	Soft bool           // if set, error is "soft"
	// contains filtered or unexported fields
}

An Error describes a type-checking error; it implements the error interface. A "soft" error is an error that still permits a valid interpretation of a package (such as "unused variable"); "hard" errors may lead to unpredictable behavior if ignored.

type Scope

type Scope struct {
	// contains filtered or unexported fields
}

A Scope maintains a set of objects and links to its containing (parent) and contained (children) scopes. Objects may be inserted and looked up by name. The zero value for Scope is a ready-to-use empty scope.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL