goutil

package
v2.0.0-...-7f6935a Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 17 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

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

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

func GoPath

func GoPath() []string

func JoinPathLists

func JoinPathLists(w ...string) string

func ParseDirGoMod

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

func PrintAstFile

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

func Printfc

func Printfc(skip int, f string, args ...interface{})

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

func StartCPUProfile() error

func StopCPUProfile

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