rename to gorush

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2016-04-13 15:22:04 +08:00
parent ceab65f733
commit 74e83d8726
20 changed files with 89 additions and 89 deletions

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"gopkg.in/yaml.v2"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"github.com/stretchr/testify/assert"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
const (
// Version is gorush server version.

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"crypto/tls"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"github.com/Sirupsen/logrus"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"errors"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"encoding/json"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"fmt"

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"github.com/appleboy/gofight"
@@ -19,8 +19,8 @@ func initTest() {
PushConf.Core.Mode = "test"
}
func TestPrintGoPushVersion(t *testing.T) {
PrintGoPushVersion()
func TestPrintGoRushVersion(t *testing.T) {
PrintGoRushVersion()
}
func TestRunNormalServer(t *testing.T) {
@@ -85,7 +85,7 @@ func TestAPIStatusHandler(t *testing.T) {
Run(routerEngine(), func(r gofight.HTTPResponse, rq gofight.HTTPRequest) {
data := []byte(r.Body.String())
value, _ := jsonparser.GetString(data, "goVersion")
value, _ := jsonparser.GetString(data, "go_version")
assert.Equal(t, goVersion, value)
assert.Equal(t, http.StatusOK, r.Code)

View File

@@ -1,4 +1,4 @@
package gopush
package gorush
import (
"fmt"
@@ -6,9 +6,9 @@ import (
"runtime"
)
// PrintGoPushVersion provide print server engine
func PrintGoPushVersion() {
fmt.Printf(`GoPush %s, Compiler: %s %s, Copyright (C) 2016 Bo-Yi Wu, Inc.`,
// PrintGoRushVersion provide print server engine
func PrintGoRushVersion() {
fmt.Printf(`GoRush %s, Compiler: %s %s, Copyright (C) 2016 Bo-Yi Wu, Inc.`,
Version,
runtime.Compiler,
runtime.Version())
@@ -18,7 +18,7 @@ func PrintGoPushVersion() {
func VersionMiddleware() gin.HandlerFunc {
// Set out header value for each response
return func(c *gin.Context) {
c.Writer.Header().Set("Server-Version", "GoPush/"+Version)
c.Writer.Header().Set("Server-Version", "GoRush/"+Version)
c.Next()
}
}