editor

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comment4Node added in v0.0.4

func Comment4Node(node ast.Node, text string) *ast.CommentGroup

Comment4Node returns *ast.CommentGroup with text positioned before node

Types

type ASTEditor added in v0.0.4

type ASTEditor func(fset *token.FileSet, file *ast.File) (*ast.File, error)

func ASTImportsFactory added in v0.0.6

func ASTImportsFactory(imports ...types.Import) ASTEditor

type CodeEditor

type CodeEditor func(*bytes.Buffer) (*bytes.Buffer, error)

func AddImportsFactory

func AddImportsFactory(imports ...string) CodeEditor

func AddNamedImportsFactory added in v0.0.6

func AddNamedImportsFactory(imports ...types.Import) CodeEditor

Jump to

Keyboard shortcuts

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