实现HTTP部分功能

This commit is contained in:
刘祥超
2020-09-26 08:07:24 +08:00
parent cc4f30a6f4
commit 60f656012f
52 changed files with 1120 additions and 391 deletions

View File

@@ -0,0 +1,28 @@
package configutils
import (
"github.com/iwind/TeaGo/logs"
"testing"
)
func TestCopyStructObject(t *testing.T) {
type Book struct {
Name string
Price int
Year int
Author string
press string
}
book1 := &Book{
Name: "Hello Golang",
Price: 100,
Year: 2020,
Author: "Liu",
press: "Beijing",
}
book2 := new(Book)
CopyStructObject(book2, book1)
logs.PrintAsJSON(book2, t)
logs.PrintAsJSON(book1, t)
}