utils

package module
v0.0.0-...-f230664 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2018 License: MIT Imports: 12 Imported by: 0

README

utils

https://openexchangerates.org/api/latest.json?app_id=980cbf495dfb4ca89818f56117f6f7ed

Documentation

Index

Constants

View Source
const DateFormat = "Y-m-d"

DateFormat : default date format

View Source
const DateTimeFormat = "Y-m-d H:i:s"

DateTimeFormat : default date time format

Variables

This section is empty.

Functions

func ContainsInt32

func ContainsInt32(s []int32, e int32) bool

func ContainsString

func ContainsString(s []string, e string) bool

func Copy

func Copy(src, dst string) error

func Date

func Date(format string, i int64) string

Date : Y-m-d 1503244800 return 2017-08-21

func DelPid

func DelPid(pth string) error

func ExecDir

func ExecDir() (string, error)

func Filter

func Filter(s string) string

func GetFiles

func GetFiles(dir string) ([]os.FileInfo, error)

func GetFilesSortByMTime

func GetFilesSortByMTime(dir string) ([]os.FileInfo, error)

func GetFilesSortByName

func GetFilesSortByName(dir string) ([]os.FileInfo, error)

func IsDir

func IsDir(dir string) bool

func IsFile

func IsFile(filePath string) bool

func IsFiles

func IsFiles(fs []string) (bool, error)

func MD5

func MD5(s string) string

func MarshalWithoutHeaders

func MarshalWithoutHeaders(in interface{}, out io.Writer) (err error)

func StrToTime

func StrToTime(s, format string) (int64, error)

StrToTime : 2017-08-21 Y-m-d return 1503244800, nil

func TimeParse

func TimeParse(date, format string) (time.Time, error)

TimeParse use to date => 2017-08-08 12:12:23 format => Y-m-d H:i:s

func WritePid

func WritePid(pth string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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