add default writer for glog to be integrated with other package; comments update for glog

This commit is contained in:
John
2019-04-17 23:50:37 +08:00
parent d55e77fb90
commit 2d3d2e783e
9 changed files with 145 additions and 196 deletions

View File

@ -1,7 +1,7 @@
package main
import (
"fmt"
"github.com/gogf/gf/g"
"github.com/gogf/gf/g/os/gcron"
"time"
)
@ -12,7 +12,9 @@ func test() {
func main() {
_, err := gcron.Add("*/10 * * * * ?", test)
fmt.Println(err)
fmt.Println(gcron.Entries())
if err != nil {
panic(err)
}
g.Dump(gcron.Entries())
time.Sleep(10 * time.Second)
}

View File

@ -0,0 +1,10 @@
package main
import (
"github.com/gogf/gf/g/os/glog"
)
func main() {
w := glog.GetWriter()
w.Write([]byte("hello"))
}