Documentation
¶
Index ¶
- func AddConfig(name, expression string) modify.Action
- func AddImport(path string, name ...string) modify.Action
- func ExprExists(x []dst.Expr, y dst.Expr) bool
- func ExprIndex(x []dst.Expr, y dst.Expr) int
- func File(path string) modify.File
- func GoFile(file string) modify.GoFile
- func IsUsingImport(df *dst.File, path string, name ...string) bool
- func KeyExists(kvs []dst.Expr, key dst.Expr) bool
- func KeyIndex(kvs []dst.Expr, key dst.Expr) int
- func MustParseExpr(x string) (node dst.Node)
- func Register(expression string, before ...string) modify.Action
- func RemoveConfig(name string) modify.Action
- func RemoveImport(path string, name ...string) modify.Action
- func ReplaceConfig(name, expression string) modify.Action
- func Unregister(expression string) modify.Action
- func WrapNewline[T dst.Node](node T) T
- type GoNode
- type OverwriteFile
- type RemoveFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustParseExpr ¶
func RemoveConfig ¶
RemoveConfig removes a configuration key from the config file.
func RemoveImport ¶
RemoveImport removes an import statement from the file.
func ReplaceConfig ¶
ReplaceConfig replaces a configuration key with the given expression in the config file.
func Unregister ¶
Unregister remove a registration from the matched specified array.
func WrapNewline ¶
Types ¶
type OverwriteFile ¶ added in v1.16.0
type OverwriteFile struct {
// contains filtered or unexported fields
}
func (*OverwriteFile) Apply ¶ added in v1.16.0
func (r *OverwriteFile) Apply() error
type RemoveFile ¶ added in v1.16.0
type RemoveFile struct {
// contains filtered or unexported fields
}
func (*RemoveFile) Apply ¶ added in v1.16.0
func (r *RemoveFile) Apply() error
Click to show internal directories.
Click to hide internal directories.