mirror of
https://gitee.com/johng/gf
synced 2026-06-07 02:12:11 +08:00
add Scan/Scanf functions for gcmd; improve gfile.IsEmpty
This commit is contained in:
@ -10,6 +10,4 @@ func main() {
|
||||
user, err := test.ModelUser().One()
|
||||
g.Dump(err)
|
||||
g.Dump(user)
|
||||
user.Password = "1"
|
||||
g.Dump(user.Update())
|
||||
}
|
||||
|
||||
@ -1,23 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"fmt"
|
||||
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/gogf/gf/os/gcmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
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()
|
||||
fmt.Println(gcmd.Scan("input:"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user