mirror of
https://github.com/injoyai/tdx.git
synced 2025-11-26 21:25:35 +08:00
优化NewWorkday
This commit is contained in:
@@ -15,7 +15,10 @@ import (
|
|||||||
"xorm.io/xorm"
|
"xorm.io/xorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewWorkday(c *Client, filename string) (*Workday, error) {
|
func NewWorkday(c *Client, filenames ...string) (*Workday, error) {
|
||||||
|
|
||||||
|
defaultFilename := filepath.Join(DefaultDatabaseDir, "workday.db")
|
||||||
|
filename := conv.Default(defaultFilename, filenames...)
|
||||||
|
|
||||||
//如果文件夹不存在就创建
|
//如果文件夹不存在就创建
|
||||||
dir, _ := filepath.Split(filename)
|
dir, _ := filepath.Split(filename)
|
||||||
|
|||||||
Reference in New Issue
Block a user