gotools

package
v0.0.0-...-6048a4a Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLineBoundary

func GetLineBoundary(source []byte, pos token.Pos) (int, int)

GetLineBoundary will return the start and end position of a line containing position pos NOTE: this method with panic if an invalid position is supplied

func GoFmt

func GoFmt(codeIn []byte) ([]byte, error)

GoFmt will format the supplied code using gofmt

func GoImports

func GoImports(fileName string, codeIn []byte) ([]byte, error)

GoImports will format the supplied code using goimports

Types

This section is empty.

Jump to

Keyboard shortcuts

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