base

package
v0.0.0-...-74ee40a Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

1. Run following code when Go version upgrades:

	go run gen.go -output data.go

2. 

Documentation

Index

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

func FilterDirName(name string) bool

FilterDirName guess the file or directory is or contains Go source files.

func FormatNumString

func FormatNumString(num int64) (s string)

func Int64

func Int64(v int) int64

func Int64sToStrings

func Int64sToStrings(ints []int64) []string

Int64sToStrings converts a slice of int64 to a slice of string. CR: copied from github.com/gogits/gogs/modules/base/tool.go

func IsDocFile

func IsDocFile(n string) bool

func IsGAERepoPath

func IsGAERepoPath(path string) bool

IsGAERepoPath returns true if path is from appengine SDK.

func IsGoRepoPath

func IsGoRepoPath(path string) bool

IsGoRepoPath returns true if path is in $GOROOT/src.

func IsValidPath

func IsValidPath(importPath string) bool

IsValidPath returns true if importPath is structurally valid.

func IsValidRemotePath

func IsValidRemotePath(importPath string) bool

IsValidRemotePath returns true if importPath is structurally valid for "go get".

func MapToSortedStrings

func MapToSortedStrings(m map[string]bool) []string

MapToSortedStrings converts a string map to a alphabet sorted slice without duplication.

func NumOfPathFlags

func NumOfPathFlags() int

func PathFlag

func PathFlag(path string) int

func Paths

func Paths() []string

func RearSubStr

func RearSubStr(str string, length int) string

func SubStr

func SubStr(str string, start, length int) string

func TimeSince

func TimeSince(then time.Time, lang string) string

Types

type TplName

type TplName string

Jump to

Keyboard shortcuts

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