Documentation ¶
Index ¶
- Constants
- Variables
- func ConcatWith(master, slave string) string
- func CopyDir(src, dst string) (err error)
- func CopyFile(src, dst string) (err error)
- func CreateFile(path string) (fp *os.File, err error)
- func CreateMd5Password(password string) string
- func CreatePassword(password string) string
- func CreateToken(prefix []byte, tailsize int) string
- func FileSize(path string) (int64, bool)
- func FindFiles(dir, ext string) (map[string]os.FileInfo, error)
- func GetChangesFor(v interface{}, changes map[string]interface{}) map[string]interface{}
- func GetColumns(v interface{}, alias string, cols []string) []string
- func GetFinalType(v interface{}) (rt reflect.Type)
- func GetFirstFile(fileNames []string, minSize int64) string
- func GetIndirectType(v interface{}) (rt reflect.Type)
- func GetNextWorkday(t time.Time) (time.Time, bool)
- func GetPasswordChanges(password string) map[string]interface{}
- func IsHoliday(date string) bool
- func ListFiles(dir, ext string) (map[string]os.FileInfo, error)
- func Md5(data string) string
- func MkdirForFile(path string, force bool) (size int64)
- func NewSerialNo(n byte) string
- func NewTimeSerialNo(n byte, t time.Time) string
- func OpenFile(path string, readonly, append bool) (fp *os.File, size int64, err error)
- func QuoteColumns(cols []string, sep string, quote func(string) string) string
- func ReduceSpaces(s string) string
- func RemoveSpaces(s string) string
- func ReplaceWith(s string, subs map[string]string) string
- func SetCalendarY2019(cal *calendar.Calendar) *calendar.Calendar
- func SetCalendarY2020(cal *calendar.Calendar) *calendar.Calendar
- func SortedKeys(data interface{}) (keys []string)
- func SprintfString(tpl string, data []string) string
- func StrToList(data []string) []interface{}
- func VerifyPassword(plainText, cipherText string) bool
- func WrapWith(s, left, right string) string
- type Globs
- type ICipher
- type Itag
- func (it *Itag) Append(key, value string)
- func (it Itag) Build(data []byte, name, value string) []byte
- func (it *Itag) Burnish(tag reflect.StructTag, names ...string)
- func (it *Itag) Delete(key string)
- func (it Itag) Get(key string) string
- func (it Itag) Lookup(key string) (string, bool)
- func (it *Itag) Parse(tag reflect.StructTag)
- func (it Itag) String() string
- type Word
Constants ¶
View Source
const ( DEFAULT_DIR_MODE = 0o755 DEFAULT_FILE_MODE = 0o644 )
View Source
const ( TAG_KEY_SEP = "/" TAG_FIELD_SEP = "," )
Variables ¶
View Source
var (
WeekEndType = calendar.W_MON_FRI // 双休
)
Functions ¶
func CopyFile ¶
CopyFile copies the contents of the file named src to the file named by dst. The file will be created if it does not already exist. If the destination file exists, all it's contents will be replaced by the contents of the source file.
func CreateMd5Password ¶
func CreatePassword ¶
func CreateToken ¶
func FileSize ¶
FileSize detect if file exists -1, false 不合法的路径 0, false 路径不存在 -1, true 存在文件夹 >=0, true 文件并存在
func GetChangesFor ¶
func GetColumns ¶
func GetFinalType ¶
func GetFirstFile ¶
GetFirstFile 逐个尝试,找出第一个存在的文件
func GetIndirectType ¶
func GetNextWorkday ¶
GetNextWorkday 找出下一个工作日(不含今天)
func GetPasswordChanges ¶
func NewSerialNo ¶
func QuoteColumns ¶
QuoteColumns 盲转义,认为字段名以小写字母开头
func ReplaceWith ¶
ReplaceWith 一一对应进行替换,次序不定(因为map的关系)
func SetCalendarY2019 ¶
SetCalendarY2019 2019年节日调休年历
func SetCalendarY2020 ¶
SetCalendarY2020 2020年节日调休年历
func SortedKeys ¶
func SortedKeys(data interface{}) (keys []string)
func SprintfString ¶
func VerifyPassword ¶
Types ¶
type ICipher ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.