Commit b5f8cdcc authored by Peter Cheng's avatar Peter Cheng

修改import路徑

parent d1131c3f
...@@ -6,9 +6,9 @@ import ( ...@@ -6,9 +6,9 @@ import (
"log" "log"
"net/http" "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/bitly/go-nsq"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
......
...@@ -7,8 +7,9 @@ import ( ...@@ -7,8 +7,9 @@ import (
"strings" "strings"
"time" "time"
"counter/env" "github.com/teed7334-restore/counter/route"
"counter/route"
"github.com/teed7334-restore/counter/env"
"github.com/bitly/go-nsq" "github.com/bitly/go-nsq"
) )
...@@ -72,10 +73,10 @@ func runServices(quete []string) { ...@@ -72,10 +73,10 @@ func runServices(quete []string) {
path := quete[0] path := quete[0]
params := []byte(quete[1]) params := []byte(quete[1])
url := cfg.Housekeeper.Host + "/" + path 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, err := http.NewRequest("POST", url, bytes.NewBuffer(params))
request.Header.Set("X-Custom-Header", "counter") request.Header.Set("X-Custom-Header", "counter")
request.Header.Set("Content-Type", "application/json") request.Header.Set("Content-Type", "application/json")
......
package route package route
import ( import (
"counter/controllers" "github.com/teed7334-restore/counter/controllers"
"counter/env" "github.com/teed7334-restore/counter/env"
"github.com/gin-gonic/gin" "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