diff --git a/option.go b/option.go index cb1c1af..eefe7bc 100644 --- a/option.go +++ b/option.go @@ -63,7 +63,7 @@ type optionExecute struct { Priority int - Execute func(*CURL, string) // 执行函数 + Parse func(*CURL, string) // 执行函数 Extract *extract // 提取的方法结构与参数 } @@ -76,7 +76,7 @@ func (oe *optionExecute) BuildFunction(curl *CURL, soption string) *parseFunctio if oe.Extract != nil { 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 { @@ -96,7 +96,7 @@ func extractData(re, soption string) string { } func parseCrontab(u *CURL, value string) { - + u.Crontab = value } func parseITask(u *CURL, value string) { diff --git a/parse_curl.go b/parse_curl.go index 98401e4..9cb1c58 100644 --- a/parse_curl.go +++ b/parse_curl.go @@ -23,7 +23,8 @@ type CURL struct { Timeout int // second Insecure bool - ITask string + ITask string + Crontab string } // New new 一个 curl 出来