package postgre import ( "sportfitness/base/assembly/base/repository" "sportfitness/base/errors" "testing" "git.beswell.com/gframe/application" ) func init() { application.NewDefault() repository.Init() Init() } func TestAdd(t *testing.T) { err := FuncTest{}.TestAdd(1, "{\"user_name\":\"ηŽ‹δΈ€\", \"usercode\": \"wang1\", \"shopid\": 1}", "XX") println(err) } func TestQuery32(t *testing.T) { str, err := FuncTest{}.TestQuery32(1, "{\"user_name\": \"ηŽ‹\"}", "XX") //if err != nil{ // e := errors.PGError // errJson, e_ := json.Marshal(e) // // if e_ != nil { // println(e_) // } // ej := string(errJson) // println(ej) //} if err != nil { panic(errors.PGError) } println(str) }