Documentation ¶
Index ¶
- Constants
- func FilterDirName(name string) bool
- func FormatNumString(num int64) (s string)
- func Int64(v int) int64
- func Int64sToStrings(ints []int64) []string
- func IsDocFile(n string) bool
- func IsGAERepoPath(path string) bool
- func IsGoRepoPath(path string) bool
- func IsValidPath(importPath string) bool
- func IsValidRemotePath(importPath string) bool
- func MapToSortedStrings(m map[string]bool) []string
- func NumOfPathFlags() int
- func PathFlag(path string) int
- func Paths() []string
- func RearSubStr(str string, length int) string
- func SubStr(str string, start, length int) string
- func TimeSince(then time.Time, lang string) string
- type TplName
Constants ¶
View Source
const ( Minute = 60 Hour = 60 * Minute Day = 24 * Hour Week = 7 * Day Month = 30 * Day Year = 12 * Month )
Seconds-based time units
Variables ¶
This section is empty.
Functions ¶
func FilterDirName ¶
FilterDirName guess the file or directory is or contains Go source files.
func FormatNumString ¶
func Int64sToStrings ¶
Int64sToStrings converts a slice of int64 to a slice of string. CR: copied from github.com/gogits/gogs/modules/base/tool.go
func IsGAERepoPath ¶
IsGAERepoPath returns true if path is from appengine SDK.
func IsGoRepoPath ¶
IsGoRepoPath returns true if path is in $GOROOT/src.
func IsValidPath ¶
IsValidPath returns true if importPath is structurally valid.
func IsValidRemotePath ¶
IsValidRemotePath returns true if importPath is structurally valid for "go get".
func MapToSortedStrings ¶
MapToSortedStrings converts a string map to a alphabet sorted slice without duplication.
func NumOfPathFlags ¶
func NumOfPathFlags() int
func RearSubStr ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.