goutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AstFileFilename

func AstFileFilename(astFile *ast.File, fset *token.FileSet) (string, error)

func FindGoMod

func FindGoMod(dir string) (string, bool)

func GoModInit added in v1.1.0

func GoModInit(ctx context.Context, dir, modPath string, env []string) error

func GoModReplace

func GoModReplace(ctx context.Context, dir, old, new string, env []string) error

func GoModRequire

func GoModRequire(ctx context.Context, dir, path string, env []string) error

func GoModTidy added in v1.1.0

func GoModTidy(ctx context.Context, dir string, env []string) error

func GoPath

func GoPath() []string

func JoinPathLists

func JoinPathLists(w ...string) string

func ParseDirGoMod added in v1.1.0

func ParseDirGoMod(dir string) (*modfile.File, string, error)

func PrintAstFile added in v1.1.0

func PrintAstFile(w io.Writer, fset *token.FileSet, astFile *ast.File) error

func ReadGoMod

func ReadGoMod(ctx context.Context, dir string, env []string) (*modfile.File, error)

func ReadSource

func ReadSource(filename string, src interface{}) ([]byte, error)

taken from: go/parser/interface.go:25:9

func SourceCursor

func SourceCursor(cursorStr, src string, n int) (string, int, error)

Allows a src string to have multiple cursor strings to simulate cursor position. Used in testing. Useful cursor runes: "●". First n position is zero.

func StartCPUProfile added in v1.1.0

func StartCPUProfile() error

func StopCPUProfile added in v1.1.0

func StopCPUProfile() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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