Documentation ¶
Index ¶
- type Utils
- func (util *Utils) CheckEnvironment(path string) string
- func (util *Utils) CheckFile(path string) bool
- func (util *Utils) CheckTemplateFile(path string) (string, error)
- func (util *Utils) ConvertUnixTime(unixTime int64) time.Time
- func (util *Utils) CreateFile(path string) bool
- func (util *Utils) DeleteFile(path string) bool
- func (util *Utils) FileRemove(path string) error
- func (util *Utils) GetCurrentPath() string
- func (util *Utils) MakeDirs(path string) error
- func (util *Utils) ParseJSON(data string) (map[string]interface{}, error)
- func (util *Utils) ParseYAML(path string) (*entity.TemplatesModels, error)
- func (util *Utils) ReadFile(path string, perm os.FileMode) string
- func (util *Utils) ReadHome() string
- func (util *Utils) WriteFile(path string, value string, perm os.FileMode) bool
- type UtilsInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Utils ¶
type Utils struct{}
Utils ...
func (*Utils) CheckEnvironment ¶
CheckEnvironment function check default env @path : string return bool, error
func (*Utils) CheckTemplateFile ¶
CheckTemplateFile check template path @argsFile: string
func (*Utils) ConvertUnixTime ¶
ConvertUnixTime ... @unixTime: int64
func (*Utils) CreateFile ¶
CreateFile function create file @path : string return bool
func (*Utils) FileRemove ¶
FileRemove Remove Files @path : string return error
func (*Utils) GetCurrentPath ¶
GetCurrentPath get current path return string
func (*Utils) ParseJSON ¶
ParseJSON function conver json string to object @data: string return map[string]interface{}, error
func (*Utils) ParseYAML ¶
func (util *Utils) ParseYAML(path string) (*entity.TemplatesModels, error)
ParseYAML ...
type UtilsInterface ¶
type UtilsInterface interface { ConvertUnixTime(unixTime int64) time.Time CheckFile(path string) bool MakeDirs(path string) error FileRemove(path string) error CreateFile(path string) bool WriteFile(path string, value string, perm os.FileMode) bool ReadFile(path string, perm os.FileMode) string DeleteFile(path string) bool ReadHome() string GetCurrentPath() string CheckEnvironment(path string) string ParseJSON(data string) (map[string]interface{}, error) CheckTemplateFile(path string) (string, error) }
UtilsInterface ..
Click to show internal directories.
Click to hide internal directories.