Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiwy committed Sep 26, 2019
1 parent 23e9cb3 commit 1ebbedc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package main

import (
"fmt"
"github.com/gin-gonic/gin"
"log"
"net/http"
_ "net/http/pprof"
"net/url"
"oktools/src/conf"
"oktools/src/contoller"
"oktools/src/middleware"
Expand Down Expand Up @@ -61,8 +63,8 @@ func main() {

if err != nil {
if gin.Mode() == gin.ReleaseMode {
_, _ = http.Get("https://sc.ftqq.com/" + conf.Conf.ThirdParty.ServerChan.Key + ".send" +
"?text=主人服务器又挂掉啦~&desp=" + err.Error())
_, _ = http.Get(fmt.Sprintf("https://sc.ftqq.com/%s.send?text=%s",
conf.Conf.ThirdParty.ServerChan.Key, url.QueryEscape("主人服务器又挂掉啦~")))
}
panic(err)
}
Expand Down

0 comments on commit 1ebbedc

Please sign in to comment.