EricKIm 2 долоо хоног өмнө
parent
commit
ae94a9652a
5 өөрчлөгдсөн 12 нэмэгдсэн , 9 устгасан
  1. 3 2
      abango.go
  2. 2 1
      config.go
  3. 2 2
      controller.go
  4. 1 1
      etc/err-log.go
  5. 4 3
      etc/file.go

+ 3 - 2
abango.go

@@ -3,6 +3,7 @@ package abango
 import (
 	"bytes"
 	"encoding/json"
+	"fmt"
 	"log"
 	"os"
 	"strings"
@@ -230,8 +231,8 @@ func RunRequest(MsgHandler func(v *AbangoAsk) (string, string, error), params *s
 			e.StrToFile(jsonreceive, retstr)
 		}
 		if XConfig["ShowReceivedJson"] == "Yes" {
-			e.Tp("Status: " + retsta + "  ReturnJsonFile: " + jsonreceive)
-			e.Tp(retstr)
+			fmt.Println("Status: " + retsta + "  ReturnJsonFile: " + jsonreceive)
+			fmt.Println(retstr)
 		}
 
 		return retstr

+ 2 - 1
config.go

@@ -2,6 +2,7 @@ package abango
 
 import (
 	"encoding/json"
+	"fmt"
 	"os"
 
 	e "github.com/dabory/abango-rest/etc"
@@ -55,7 +56,7 @@ func GetXConfig(params ...string) error { // Kafka, gRpc, REST 통합 업그레
 	}
 
 	if XConfig["RestOn"] == "Yes" || XConfig["ApiType"] == "Rest" {
-		e.Tp("==" + "Config file prefix: " + run.ConfSelect + "== REST Connection: " + XConfig["RestConnect"] + "==")
+		fmt.Println("==" + "Config file prefix: " + run.ConfSelect + "== REST Connection: " + XConfig["RestConnect"] + "==")
 	}
 	return nil
 }

+ 2 - 2
controller.go

@@ -117,7 +117,7 @@ func (c *Controller) AttachDB() (int, string) {
 // func (c *Controller) KafkaAnswer(body string) {
 
 // 	// c.Ctx.Answer.Body = []byte(body) // 쓸데없는 것 같은데 나중에 지
-// 	// e.Tp("ReturnTopic=" + c.Ctx.ReturnTopic)
+// 	// fmt.Println("ReturnTopic=" + c.Ctx.ReturnTopic)
 // 	if _, _, err := KafkaProducer(body,
 // 		c.Ctx.ReturnTopic, c.ConnString, XConfig["api_method"]); err != nil {
 // 		e.MyErr("WERRWEEWQRFDFHQW", err, false)
@@ -137,7 +137,7 @@ func (c *Controller) AnswerJson() {
 	// } else {
 	// 	ret, _ = json.Marshal(c.Data["json"])
 	// }
-	// // e.Tp(string(ret))
+	// // fmt.Println(string(ret))
 	// if c.Ctx.Ask.ApiType == "Kafka" {
 	// 	c.KafkaAnswer(string(ret))
 	// } else if c.Ctx.Ask.ApiType == "gRpc" {

+ 1 - 1
etc/err-log.go

@@ -292,6 +292,6 @@ func WhereAmI(depthList ...int) {
 	return
 }
 
-func QryPathNSql(path string, sql string) string { // // nㅣl처리 아주 중요함 ( 이건 이제 더 사용하지 말것)
+func QryPathSql(path string, sql string) string { // // nㅣl처리 아주 중요함 ( 이건 이제 더 사용하지 말것)
 	return "====" + path + "====\n" + sql + "\n" + "===================\n"
 }

+ 4 - 3
etc/file.go

@@ -6,6 +6,7 @@
 package etc
 
 import (
+	"fmt"
 	"io"
 	"io/ioutil"
 	"net/http"
@@ -42,7 +43,7 @@ func StrToFile(path string, str string) error {
 
 	var file, err3 = os.OpenFile(path, os.O_RDWR, 0644)
 	if err3 != nil {
-		Tp(err3)
+		fmt.Println(err3)
 		return err3
 	}
 	defer file.Close()
@@ -50,7 +51,7 @@ func StrToFile(path string, str string) error {
 	// Write some text line-by-line to file.
 	_, err3 = file.WriteString(str)
 	if err3 != nil {
-		Tp(err3)
+		fmt.Println(err3)
 		return err3
 	}
 
@@ -80,7 +81,7 @@ func StrToFile(path string, str string) error {
 	// 		return err
 	// 	} else {
 	// 		if err := file.Sync(); err != nil {
-	// 			e.Tp(err)
+	// 			fmt.Println(err)
 	// 		}
 	// 		return err
 	// 		file.Close()