完善包注释,便于godoc管理

This commit is contained in:
John
2018-01-03 10:38:53 +08:00
parent b0ebf48930
commit 27564157f3
41 changed files with 60 additions and 47 deletions

View File

@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 单进程缓存管理
package gcache
import (

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
//
// 命令行管理
package gcmd
import (

View File

@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 环境变量管理
package genv
import "os"

View File

@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 文件管理
package gfile
import (

View File

@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 文件指针池
package gfilepool
import (

View File

@ -5,8 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// 文件空间管理, 可用于文件碎片空间维护及再利用,支持自动合并连续碎片空间
package gfilespace
import (

View File

@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 时间管理
package gtime
import (
@ -25,9 +25,8 @@ func SetInterval(t time.Duration, callback func() bool) {
go func() {
for {
time.Sleep(t)
r := callback()
if !r {
break;
if !callback() {
break
}
}
}()

View File

@ -4,7 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 视图管理
package gview
import (
@ -38,7 +38,7 @@ type Template struct {
var viewMap = gmap.NewStringInterfaceMap()
// 获取或者创建一个视图对象
func GetView(path string) *View {
func Get(path string) *View {
if r := viewMap.Get(path); r != nil {
return r.(*View)
}
@ -49,7 +49,7 @@ func GetView(path string) *View {
// 生成一个视图对象
func New(path string) *View {
return &View{
return &View {
path : path,
tpls : gmap.NewStringInterfaceMap(),
suffix : "tpl",