| "https://c.hitxy.org.au/", | "https://c.hitxy.org.au/", | ||||
| "wechat", | "wechat", | ||||
| "crmwechat.api"} | "crmwechat.api"} | ||||
| GlobalPath = PathsConfig{"/tmp"} | |||||
| } | } | ||||
| func AssertEqual(t *testing.T, a interface{}, b interface{}, message string) { | func AssertEqual(t *testing.T, a interface{}, b interface{}, message string) { |
| "net/http" | "net/http" | ||||
| ) | ) | ||||
| //PathsConfig all system available pathes | |||||
| type PathsConfig struct { | |||||
| CRMAttachment string `json:"crm_attachmeng"` | |||||
| } | |||||
| //GlobalPath all global pathes configurations | |||||
| var GlobalPath = PathsConfig{"/tmp/"} | |||||
| func main() { | func main() { | ||||
| err := readConfig() //wechat API config | err := readConfig() //wechat API config | ||||
| if err != nil { | if err != nil { |
| defer f.Close() | defer f.Close() | ||||
| io.Copy(f, file) | io.Copy(f, file) | ||||
| } | } | ||||
| func crmAttachmentHandler(w http.Response, r *http.Request) { | |||||
| http.ServeFile(w, r) | |||||
| } |