diff --git a/.example/frame/mvc/model/test/init.go b/.example/frame/mvc/model/test/Initialization.go similarity index 100% rename from .example/frame/mvc/model/test/init.go rename to .example/frame/mvc/model/test/Initialization.go diff --git a/.example/frame/mvc/model/test/user.go b/.example/frame/mvc/model/test/User.go similarity index 100% rename from .example/frame/mvc/model/test/user.go rename to .example/frame/mvc/model/test/User.go diff --git a/.example/other/test.go b/.example/other/test.go index a183344e2..efc86bd9a 100644 --- a/.example/other/test.go +++ b/.example/other/test.go @@ -1,13 +1,23 @@ package main import ( - "fmt" - "github.com/gogf/gf/internal/utilbytes" + "os" + + "github.com/olekukonko/tablewriter" ) func main() { - b := []byte{48, 49, 50, 51, 52, 53} - fmt.Println(string(b)) - fmt.Println([]byte("\xff\xff")) - fmt.Printf(utilbytes.Export(b)) + data := [][]string{ + []string{"1/1/2014", "Domain name", "2233", "$10.98"}, + []string{"1/1/2014", "January Hosting", "2233", "$54.95"}, + []string{"1/4/2014", "February Hosting", "2233", "$51.00"}, + []string{"1/4/2014", "February Extra Bandwidth", "2233", "$30.00"}, + } + + table := tablewriter.NewWriter(os.Stdout) + table.SetBorder(false) + table.SetRowLine(false) + table.SetColumnSeparator("") + table.AppendBulk(data) + table.Render() } diff --git a/database/gdb/gdb_structure.go b/database/gdb/gdb_structure.go index b88c459a0..374f38a7c 100644 --- a/database/gdb/gdb_structure.go +++ b/database/gdb/gdb_structure.go @@ -10,6 +10,8 @@ import ( "fmt" "strings" + "github.com/gogf/gf/text/gstr" + "github.com/gogf/gf/os/gtime" "github.com/gogf/gf/encoding/gbinary" @@ -27,9 +29,15 @@ func (bs *dbBase) convertValue(fieldValue []byte, fieldType string) interface{} return fieldValue case "int", "tinyint", "small_int", "medium_int": + if gstr.ContainsI(fieldType, "unsigned") { + gconv.Uint(string(fieldValue)) + } return gconv.Int(string(fieldValue)) case "big_int": + if gstr.ContainsI(fieldType, "unsigned") { + gconv.Uint64(string(fieldValue)) + } return gconv.Int64(string(fieldValue)) case "float", "double", "decimal": diff --git a/os/gcfg/gcfg_config.go b/os/gcfg/gcfg_config.go index daa60a7ec..b33087ea4 100644 --- a/os/gcfg/gcfg_config.go +++ b/os/gcfg/gcfg_config.go @@ -41,7 +41,7 @@ func GetContent(file ...string) string { return configs.Get(name) } -// RemoveConfig removes the global configuration with specified group. +// RemoveConfig removes the global configuration with specified . // If is not passed, it removes configuration of the default group name. func RemoveConfig(file ...string) { name := DEFAULT_CONFIG_FILE