Documentation ¶
Overview ¶
Package goutil implements some utility functions related to go
Index ¶
- func Format(fname string, r io.Reader, w io.Writer) error
- func IsExported(name string) bool
- func IsGoFile(fname string) bool
- func IsSrcFile(fname string) bool
- func IsTestFile(fname string) bool
- func PackagePath(pkgName string) string
- func SrcTestFile(fname string) string
- func ToExported(str string) string
- func ToSameExported(example, str string) string
- func ToUnexported(str string) string
- func WriteImportpath(w io.Writer, path ...string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsExported ¶
IsExported return whether or not field is exported it's just a wrapper of ast.IsExported
func PackagePath ¶
PackagePath find package absolute path use env variable GOPATH
func SrcTestFile ¶
SrcTestFile convert fname to corresponding test file name
func ToExported ¶
ToExported return the exported case of a string
func ToSameExported ¶
ToSameExported return the same exported case with example string of a string
func ToUnexported ¶
ToUnexported return the unexported case of a string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.