add Scan/Scanf functions for gcmd; improve gfile.IsEmpty

This commit is contained in:
John
2019-09-05 20:00:01 +08:00
parent dfc76ddb76
commit 952eb7df15
4 changed files with 34 additions and 20 deletions

View File

@ -10,6 +10,4 @@ func main() {
user, err := test.ModelUser().One()
g.Dump(err)
g.Dump(user)
user.Password = "1"
g.Dump(user.Update())
}

View File

@ -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:"))
}