tools

package module
v0.0.0-...-0c3c996 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNeedImages

func IsNeedImages(fi os.FileInfo, localPath string) bool

IsNeedImages 检测是否是需要的jpeg文件

Types

type Config

type Config struct {
	LoadedConfig interface{}
}

Config 对象

func (*Config) LoadConfig

func (conf *Config) LoadConfig(confPath string, v interface{}) interface{}

LoadConfig 载入配置文件函数 confPath string 为config配置文件的路径和文件名 v *interface{} 可以是一个结构体

func (*Config) WriteConfig

func (conf *Config) WriteConfig(path string, v interface{}) error

WriteConfig 将结构体转换成json,在写入path路径这种指定文件

type Logger

type Logger struct {
	Format   string
	LogPath  string
	Filename string
	// contains filtered or unexported fields
}

Logger 对象

func (*Logger) CloseLogger

func (logger *Logger) CloseLogger()

CloseLogger 关闭日志对象

func (*Logger) CreateLogger

func (logger *Logger) CreateLogger(logpath string, filename string) *Logger

CreateLogger 创建日志对象

func (*Logger) ErrorOutput

func (logger *Logger) ErrorOutput(msg interface{})

ErrorOutput 错误输出到文件 msg 为字符串类型的错误信息

func (*Logger) InfoOutput

func (logger *Logger) InfoOutput(msg interface{})

InfoOutput 输出普通信息到文件 msg 为字符串类型的文本信息

func (*Logger) StdOut

func (logger *Logger) StdOut(msg string)

StdOut 使用fmt.Println输入字符串

type TaskSchedObject

type TaskSchedObject struct {
	DateFormat string
	TimeFormat string
}

TaskSchedObject object

func NewTaskSchedObjct

func NewTaskSchedObjct() *TaskSchedObject

NewTaskSchedObjct 创建TaskSchedObject

func (*TaskSchedObject) CreateTask

func (ts *TaskSchedObject) CreateTask(taskName string, execPath string, startTime string) (string, string, error)

CreateTask 创建任务计划

func (*TaskSchedObject) QueryTask

func (ts *TaskSchedObject) QueryTask(taskName string) (string, string, error)

QueryTask 查询任务计划

Jump to

Keyboard shortcuts

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