Initial 423down proxy service
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
// response 是接口统一返回结构。
|
||||
type response struct {
|
||||
Ok bool `json:"ok"`
|
||||
Error string `json:""`
|
||||
Html string `json:"html"`
|
||||
}
|
||||
|
||||
// createErr 将错误转换为接口统一响应。
|
||||
func createErr(err error) response {
|
||||
return response{
|
||||
Ok: false,
|
||||
Error: err.Error(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user