Browse Source

241103-2309-Kim

EricKIm 2 weeks ago
parent
commit
ae94a9652a
5 changed files with 12 additions and 9 deletions
  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 (
 import (
 	"bytes"
 	"bytes"
 	"encoding/json"
 	"encoding/json"
+	"fmt"
 	"log"
 	"log"
 	"os"
 	"os"
 	"strings"
 	"strings"
@@ -230,8 +231,8 @@ func RunRequest(MsgHandler func(v *AbangoAsk) (string, string, error), params *s
 			e.StrToFile(jsonreceive, retstr)
 			e.StrToFile(jsonreceive, retstr)
 		}
 		}
 		if XConfig["ShowReceivedJson"] == "Yes" {
 		if XConfig["ShowReceivedJson"] == "Yes" {
-			e.Tp("Status: " + retsta + "  ReturnJsonFile: " + jsonreceive)
-			e.Tp(retstr)
+			fmt.Println("Status: " + retsta + "  ReturnJsonFile: " + jsonreceive)
+			fmt.Println(retstr)
 		}
 		}
 
 
 		return retstr
 		return retstr

+ 2 - 1
config.go

@@ -2,6 +2,7 @@ package abango
 
 
 import (
 import (
 	"encoding/json"
 	"encoding/json"
+	"fmt"
 	"os"
 	"os"
 
 
 	e "github.com/dabory/abango-rest/etc"
 	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" {
 	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
 	return nil
 }
 }

+ 2 - 2
controller.go

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

+ 1 - 1
etc/err-log.go

@@ -292,6 +292,6 @@ func WhereAmI(depthList ...int) {
 	return
 	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"
 	return "====" + path + "====\n" + sql + "\n" + "===================\n"
 }
 }

+ 4 - 3
etc/file.go

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