Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conv ¶
type Conv interface {
// WriteDefineCode writes a function definition code for the converter.
WriteDefineCode(*codefmt.Writer)
// Pos returns the token position of the converter in the source code. It
// would be token.NoPos if the converter is generated implicitly.
Pos() token.Pos
}
Conv represents a converter generated by Convgen regardless of explicit or implicit.
type Object ¶
type Object interface {
// With the following struct definitions in example.com/pkg package:
// type Session struct {
// SignedUser User
// }
// type User struct {
// Name string
// }
// The following shows the values of the methods for the field
// Session.SignedUser.Name:
Type() typeinfo.Type // e.g., string
QualName() string // e.g., User.Name
CrumbName() string // e.g., Session.SignedUser.Name
DebugName() string // e.g., Session.SignedUser.Name (type string)
Exported() bool
Pos() token.Pos
}
Object is the common interface for things that can be assigned to another things. It must provide the type information and may have the name. Here is the list of objects:
- pointer - map key/value - slice element - struct field - union member - enum member
Click to show internal directories.
Click to hide internal directories.