master
parent
efd3258873
commit
3399993966
@ -1,17 +0,0 @@
|
||||
package dingdanxia
|
||||
|
||||
import (
|
||||
"gopkg.in/dtapps/go-library.v3/utils/gotime"
|
||||
"log"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestApp_JdJyOrderDetails(t *testing.T) {
|
||||
param := NewParams()
|
||||
param.Set("startTime", gotime.Current().BeforeDay(28).Timestamp())
|
||||
param.Set("endTime", gotime.Current().Timestamp())
|
||||
param.Set("itemsPerPage", 60)
|
||||
param.Set("curPage", 1)
|
||||
param.Set("type", 1)
|
||||
log.Printf("%+v\n", app.JdJyOrderDetails(param))
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package dingdanxia
|
||||
|
||||
import (
|
||||
"gopkg.in/dtapps/go-library.v3/utils/gotime"
|
||||
"log"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestApp_WaimaiMeituanOrders(t *testing.T) {
|
||||
param := NewParams()
|
||||
param.Set("start_time", gotime.Current().BeforeDay(28).Timestamp())
|
||||
param.Set("end_time", gotime.Current().Timestamp())
|
||||
log.Printf("%+v\n", app.WaimaiMeituanOrders(param))
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package ip
|
||||
|
||||
import (
|
||||
"net"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var app App
|
||||
|
||||
func TestIp(t *testing.T) {
|
||||
t.Log(net.ParseIP("61.241.55.180").To4())
|
||||
t.Log(net.ParseIP("240e:3b4:38e4:3295:7093:af6c:e545:f2e9").To16())
|
||||
t.Log(app.V4db.Find("61.241.55.180"))
|
||||
t.Log(app.V6db.Find("240e:3b4:38e4:3295:7093:af6c:e545:f2e9"))
|
||||
t.Log(app.V4Region.MemorySearch("61.241.55.180"))
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package golog
|
||||
|
||||
import (
|
||||
"log"
|
||||
"testing"
|
||||
)
|
||||
|
||||
var app = App{
|
||||
LogPath: "./",
|
||||
LogName: "all.log",
|
||||
LogLevel: "debug",
|
||||
MaxSize: 2,
|
||||
MaxBackups: 30,
|
||||
MaxAge: 0,
|
||||
Compress: false,
|
||||
JsonFormat: false,
|
||||
ShowLine: true,
|
||||
LogInConsole: true,
|
||||
}
|
||||
|
||||
func TestLog(t *testing.T) {
|
||||
log.Println(app.Logger)
|
||||
app.InitLogger()
|
||||
app.Logger.Debug("debug 日志")
|
||||
app.Logger.Sugar().Debug("debug 日志")
|
||||
app.Logger.Info("info 日志")
|
||||
app.Logger.Sugar().Info("info 日志")
|
||||
app.Logger.Warn("warning 日志")
|
||||
app.Logger.Sugar().Warn("warning 日志")
|
||||
app.Logger.Error("error 日志")
|
||||
app.Logger.Sugar().Error("error 日志")
|
||||
log.Println(app.Logger)
|
||||
}
|
Loading…
Reference in new issue