Documentation ¶
Index ¶
- Constants
- func BuildFormat(info HelpInfo) string
- func CheckIfError(err error)
- func Home() (string, error)
- func IsFileExist(path string) bool
- func OpenBrowser(url string) error
- func PrintParams(format string, flagColor Color, params []ParamVO)
- func PrintTitle(command string, helpInfo HelpInfo)
- func PrintWithColorful()
- func ReadCsvFile(filename string) [][]string
- func ReadFileLines(filename string, filterFunc func(string) bool, ...) []interface{}
- func ReadFileLinesNoFilter(filename string, mapFunc func(string) interface{}) []interface{}
- type ArrayFlags
- type BufferWriter
- type Color
- type HelpInfo
- type ParamInfo
- type ParamVO
- type Set
- func (s *Set) Add(val ...interface{})
- func (s *Set) Adds(set *Set)
- func (s *Set) Clear()
- func (s *Set) Contains(val interface{}) bool
- func (s *Set) Difference(set *Set) *Set
- func (s *Set) Intersect(set *Set) *Set
- func (s *Set) Intersection(set *Set) *Set
- func (s *Set) IsEmpty() bool
- func (s *Set) Len() int
- func (s *Set) Loop(action func(interface{}))
- func (s *Set) Remove(val interface{})
- func (s *Set) Supplementary(set *Set) *Set
- func (s *Set) Union(set *Set) *Set
- type Value
Constants ¶
View Source
const ( YYYY = "2006" YYYY_MM = "2006-01" YYYY_MM_DD = "2006-01-02" YYYY_MM_DD_HH = "2006-01-02 15" YYYY_MM_DD_HH_MM = "2006-01-02 15:04" YYYY_MM_DD_HH_MM_SS = "2006-01-02 15:04:05" YYYY_MM_DD_HH_MM_SS_MS = "2006-01-02 15:04:05.000" HH_MM_SS = "15:04:05" HH_MM_SS_MS = "15:04:05.000" )
Variables ¶
This section is empty.
Functions ¶
func OpenBrowser ¶
func ReadCsvFile ¶
func ReadFileLines ¶
func ReadFileLines(filename string, filterFunc func(string) bool, mapFunc func(string) interface{}) []interface{}
ReadFileLines filter and map
func ReadFileLinesNoFilter ¶
ReadFileLinesNoFilter only map
Types ¶
type ArrayFlags ¶
type ArrayFlags []string
func (*ArrayFlags) Set ¶
func (i *ArrayFlags) Set(value string) error
Set 方法是flag.Value接口, 设置flag Value的方法. 通过多个flag指定的值, 所以我们追加到最终的数组上.
type BufferWriter ¶
type BufferWriter struct {
// contains filtered or unexported fields
}
func NewWriterIgnoreError ¶
func NewWriterIgnoreError(filePath string, truncate bool) *BufferWriter
func (*BufferWriter) Close ¶
func (w *BufferWriter) Close()
func (*BufferWriter) WriteString ¶
func (w *BufferWriter) WriteString(val string) (nn int, err error)
type Color ¶
type Color string
const ( Red Color = "\033[0;31m" Green Color = "\033[0;32m" Yellow Color = "\033[0;33m" Blue Color = "\033[0;34m" Purple Color = "\033[0;35m" Cyan Color = "\033[0;36m" White Color = "\033[0;37m" LightRed Color = "\033[0;91m" LightGreen Color = "\033[0;92m" LightYellow Color = "\033[0;93m" LightBlue Color = "\033[0;94m" LightPurple Color = "\033[0;95m" LightCyan Color = "\033[0;96m" LightWhite Color = "\033[0;97m" End Color = "\033[0m" )
func (Color) PrintNoEnd ¶
Print content with color no end
type HelpInfo ¶
Click to show internal directories.
Click to hide internal directories.