change name ! let the structure be clear !
This commit is contained in:
parent
6f299f87e7
commit
2127db6ce2
|
@ -63,7 +63,7 @@ type optionExecute struct {
|
||||||
|
|
||||||
Priority int
|
Priority int
|
||||||
|
|
||||||
Execute func(*CURL, string) // 执行函数
|
Parse func(*CURL, string) // 执行函数
|
||||||
Extract *extract // 提取的方法结构与参数
|
Extract *extract // 提取的方法结构与参数
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ func (oe *optionExecute) BuildFunction(curl *CURL, soption string) *parseFunctio
|
||||||
if oe.Extract != nil {
|
if oe.Extract != nil {
|
||||||
data = oe.Extract.Execute(data)
|
data = oe.Extract.Execute(data)
|
||||||
}
|
}
|
||||||
return &parseFunction{ParamCURL: curl, ParamData: data, ExecuteFunction: oe.Execute, Priority: oe.Priority}
|
return &parseFunction{ParamCURL: curl, ParamData: data, ExecuteFunction: oe.Parse, Priority: oe.Priority}
|
||||||
}
|
}
|
||||||
|
|
||||||
func judgeOptions(u *CURL, soption string) *parseFunction {
|
func judgeOptions(u *CURL, soption string) *parseFunction {
|
||||||
|
@ -96,7 +96,7 @@ func extractData(re, soption string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseCrontab(u *CURL, value string) {
|
func parseCrontab(u *CURL, value string) {
|
||||||
|
u.Crontab = value
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseITask(u *CURL, value string) {
|
func parseITask(u *CURL, value string) {
|
||||||
|
|
|
@ -23,7 +23,8 @@ type CURL struct {
|
||||||
Timeout int // second
|
Timeout int // second
|
||||||
Insecure bool
|
Insecure bool
|
||||||
|
|
||||||
ITask string
|
ITask string
|
||||||
|
Crontab string
|
||||||
}
|
}
|
||||||
|
|
||||||
// New new 一个 curl 出来
|
// New new 一个 curl 出来
|
||||||
|
|
Loading…
Reference in New Issue
Block a user