zhwwvip

package module
v13.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 12 Imported by: 0

README

zhwwvip

介绍

自定义包

软件架构

软件架构说明

安装教程
  1. xxxx
  2. xxxx
  3. xxxx
使用说明
  1. xxxx
  2. xxxx
  3. xxxx
参与贡献
  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request
特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func After

func After(t time.Duration, f func() interface{}) (interf interface{})

time.NewTicker.C定时器(秒)

func Conversion

func Conversion(c ByteConversion, s string) string

字节换算函数

func GetDay

func GetDay() int

获取当天

func GetMonth

func GetMonth() int

获取当月

func GetNanoSecond

func GetNanoSecond() int64

获取时间戳(纳秒)

func GetNow

func GetNow() (now string)

获取时间日期

func GetSecond

func GetSecond() int64

获取时间戳(秒)

func GetTimeInterval

func GetTimeInterval(year int, month time.Month, day int) (y, d int)

获取时间间隔,返回值:年数,天数。

func GetTimestamp

func GetTimestamp(year int, month time.Month, day, hour, minute, sec int) (nanosecond, second int64)

获取指定时间戳,返回值:纳秒、秒。

func GetWeekday

func GetWeekday() string

获取星期

func GetYear

func GetYear() int

获取当年

func NewTicker

func NewTicker(t time.Duration, f func() interface{}) (interf interface{})

time.NewTicker.C定时器(秒)

func NewTimer

func NewTimer(t time.Duration, f func() interface{}) (interf interface{})

time.NewTimer.C定时器(秒)

func NsecToTimeDate

func NsecToTimeDate(nsec int64) (s string)

时间戳(纳秒)转日期时间

func SecToTimeDate

func SecToTimeDate(sec int64) (s string)

时间戳(秒)转日期时间

func Sleep

func Sleep(t int)

time.Sleep睡眠(秒)

func StringToTimeDate

func StringToTimeDate(s string) (t time.Time)

字符串转日期时间,参数格式:2006-1-2 15:4:5。

func Tick

func Tick(t time.Duration, f func() interface{}) (interf interface{})

time.Tick定时器(秒)

Types

type Byte

type Byte struct {
	Byte int64
}

字节空结构体

type ByteConversion

type ByteConversion interface {
	// contains filtered or unexported methods
}

字节换算接口

type File

type File struct {
}

文件操作空结构体

func (File) BufioFile

func (f File) BufioFile(name string) (n, w int, s string, err error)

只读方式打开文件(有缓冲),并获取文件大小、字数,内容,以及反馈信息

func (File) CopyByteFile

func (f File) CopyByteFile(source, target string) (err error)

复制文件(字节),并获取反馈信息。

func (File) CopyFile

func (f File) CopyFile(source, target string) (n int64, err error)

复制文件,并获取文件文件大小,以及反馈信息。

func (File) CreateFile

func (f File) CreateFile(name string) (file *os.File, err error)

创建文件,并返回文件句柄、反馈信息。

func (File) CreateFolder

func (f File) CreateFolder(name string) (err error)

创建文件夹,并返回文件句柄、反馈信息。

func (File) DirsFiles

func (f File) DirsFiles(root string) (n int64, slice []string, err error)

展示

func (File) GetFileInfo

func (f File) GetFileInfo(name string) (m map[string]interface{}, err error)

获取文件(夹)各项信息:名称、大小、创建时间、最后写入时间、最后打开时间,以及反馈信息。

func (File) IoutilDir

func (f File) IoutilDir(dirname string) (err error)

ioutil遍历目录(文件夹),返回反馈信息。

func (File) IoutilFile

func (f File) IoutilFile(name string) (n, w int, s string, err error)

打开小文件(无缓冲),并获取文件大小、字数,内容,以及反馈信息

func (File) RuleFile

func (f File) RuleFile(name string) (n, w int, s string, err error)

只读方式打开文件(无缓冲),并获取文件大小、字数,内容,以及反馈信息。

func (File) WriteATFile

func (f File) WriteATFile(name, word string, offset int64, whence int) (n int, err error)

文件任意位置写入数据,并获取写入数据字节数,以及反馈信息。

func (File) WriteNewFile

func (f File) WriteNewFile(name, word string) (n int, err error)

新建文件并写入数据,并获取文件信息,以及反馈信息。

Jump to

Keyboard shortcuts

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