mirror of
https://gitee.com/johng/gf
synced 2026-07-09 06:50:30 +08:00
完善包注释,便于godoc管理
This commit is contained in:
@ -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 (
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
//
|
||||
|
||||
// 命令行管理
|
||||
package gcmd
|
||||
|
||||
import (
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -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 (
|
||||
|
||||
@ -5,8 +5,6 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
|
||||
// 文件空间管理, 可用于文件碎片空间维护及再利用,支持自动合并连续碎片空间
|
||||
|
||||
|
||||
package gfilespace
|
||||
|
||||
import (
|
||||
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user