完善包注释,便于godoc管理

This commit is contained in:
John
2018-01-03 10:53:45 +08:00
parent 05b76a14c0
commit 7e38b98c6f
9 changed files with 23 additions and 22 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.
// 二进制及byte操作管理包
// 二进制及byte操作
package gbinary
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.
// 强大的JSON解析/封装
// JSON解析/封装
package gjson
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.
// 全局配置管理对象配置文件为json文件
// 配置管理
package gcfg
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.
// MVC控制器基类
// MVC
package gmvc
import (

View File

@ -4,9 +4,10 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// MVC模型基类
package gmvc
// MVC模型基类
type Model struct {
}

View File

@ -4,7 +4,6 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// MVC视图基类
package gmvc
import (
@ -15,7 +14,7 @@ import (
"gitee.com/johng/gf/g/net/ghttp"
)
// 视图对象(一个请求一个视图对象,用完即销毁)
// MVC视图基类(一个请求一个视图对象,用完即销毁)
type View struct {
mu sync.RWMutex // 并发互斥锁
view *gview.View // 底层视图对象

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

@ -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 gfilespace
import (

View File

@ -6,6 +6,20 @@
// 通用数据验证工具
// 本来打算取名gvalidator的名字太长了缩写一下
package gvalid
import (
"strings"
"regexp"
"strconv"
"gitee.com/johng/gf/g/os/gtime"
"gitee.com/johng/gf/g/net/gipv4"
"gitee.com/johng/gf/g/net/gipv6"
"gitee.com/johng/gf/g/util/gregx"
"gitee.com/johng/gf/g/encoding/gjson"
"gitee.com/johng/gf/g/container/gmap"
)
/*
参考https://laravel.com/docs/5.5/validation#available-validation-rules
规则如下:
@ -50,19 +64,6 @@ in 格式in:value1,value2,... 说明:参
not-in 格式not-in:value1,value2,... 说明参数值不应该在value1,value2,...中(字符串匹配)
regex 格式regex:pattern 说明参数值应当满足正则匹配规则pattern
*/
package gvalid
import (
"strings"
"regexp"
"strconv"
"gitee.com/johng/gf/g/os/gtime"
"gitee.com/johng/gf/g/util/gregx"
"gitee.com/johng/gf/g/encoding/gjson"
"gitee.com/johng/gf/g/container/gmap"
"gitee.com/johng/gf/g/net/gipv6"
"gitee.com/johng/gf/g/net/gipv4"
)
// 默认规则校验错误消息(可以通过接口自定义错误消息)
var defaultMessages = map[string]string {