goutil

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package goutil implements some utility functions related to go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(fname string, r io.Reader, w io.Writer) error

Format source from reader to writer

func IsExported

func IsExported(name string) bool

IsExported return whether or not field is exported it's just a wrapper of ast.IsExported

func IsGoFile

func IsGoFile(fname string) bool

IsGoFile check whether file is go file

func IsSrcFile

func IsSrcFile(fname string) bool

IsSrcFile check whether file is go source file

func IsTestFile

func IsTestFile(fname string) bool

IsTestFile check whether file is go test file

func PackagePath

func PackagePath(pkgName string) string

PackagePath find package absolute path use env variable GOPATH

func SrcTestFile

func SrcTestFile(fname string) string

SrcTestFile convert fname to corresponding test file name

func ToExported

func ToExported(str string) string

ToExported return the exported case of a string

func ToSameExported

func ToSameExported(example, str string) string

ToSameExported return the same exported case with example string of a string

func ToUnexported

func ToUnexported(str string) string

ToUnexported return the unexported case of a string

func WriteImportpath

func WriteImportpath(w io.Writer, path ...string) (int, error)

WriteImportPath write path to writer, automaticlly join with '/', quote it and start a new line

Types

This section is empty.

Jump to

Keyboard shortcuts

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