From 2127db6ce2003a8da2c7eb4c35c10ec9c42de0f7 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Thu, 6 Dec 2018 14:31:23 +0800 Subject: [PATCH] change name ! let the structure be clear ! --- option.go | 6 +++--- parse_curl.go | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) 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 出来