Commit b5f8cdcc authored by Peter Cheng's avatar Peter Cheng

修改import路徑

parent d1131c3f
......@@ -6,9 +6,9 @@ import (
"log"
"net/http"
"counter/beans"
"github.com/teed7334-restore/counter/beans"
"counter/env"
"github.com/teed7334-restore/counter/env"
"github.com/bitly/go-nsq"
"github.com/gin-gonic/gin"
......
......@@ -7,8 +7,9 @@ import (
"strings"
"time"
"counter/env"
"counter/route"
"github.com/teed7334-restore/counter/route"
"github.com/teed7334-restore/counter/env"
"github.com/bitly/go-nsq"
)
......@@ -72,10 +73,10 @@ func runServices(quete []string) {
path := quete[0]
params := []byte(quete[1])
url := cfg.Housekeeper.Host + "/" + path
getURL(url, params)
postURL(url, params)
}
func getURL(url string, params []byte) {
func postURL(url string, params []byte) {
request, err := http.NewRequest("POST", url, bytes.NewBuffer(params))
request.Header.Set("X-Custom-Header", "counter")
request.Header.Set("Content-Type", "application/json")
......
package route
import (
"counter/controllers"
"github.com/teed7334-restore/counter/controllers"
"counter/env"
"github.com/teed7334-restore/counter/env"
"github.com/gin-gonic/gin"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment