完善包注释,便于godoc管理

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

View File

@ -1,6 +1,6 @@
// from https://github.com/google/btree
// B+ Tree
package gbtree
import (

View File

@ -4,8 +4,8 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
//
//
// 并发安全的双向链表
package glist
import (

8
g/container/gmap/gmap.go Normal file
View File

@ -0,0 +1,8 @@
// Copyright 2017 gf Author(https://gitee.com/johng/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 并发安全的MAP
package gmap

8
g/container/gset/gset.go Normal file
View File

@ -0,0 +1,8 @@
// Copyright 2017 gf Author(https://gitee.com/johng/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 并发安全的SET
package gset

View File

@ -3,9 +3,8 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
//
// 对常用关系数据库的封装管理包
// 关系数据库操作
package gdb
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.
// BASE64
package gbase64
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// 二进制及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.
// 数据压缩/解压
package gcompress
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.
// CRC32
package gcrc32
import (

View File

@ -4,8 +4,7 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 封装常用的hash函数
// 常用的hash函数
package ghash

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.
// HTML编码
package ghtml
import "strings"

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 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.
// MD5
package gmd5
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.
// SHA1
package gsha1
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.
// URL编码
package gurl
import "net/url"

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// 全局配置管理对象配置文件为json文件
package gcfg
import (

View File

@ -6,7 +6,6 @@
// 单例对象管理工具
// 框架内置了一些核心对象并且可以通过Set和Get方法实现IoC以及对内置核心对象的自定义替换
package gins
import (
@ -53,7 +52,7 @@ func View() *gview.View {
path = gfile.SelfDir()
}
}
view := gview.GetView(path)
view := gview.Get(path)
Set(FRAME_CORE_COMPONENT_NAME_VIEW, view)
return view
}

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// MVC控制器基类
package gmvc
import (

View File

@ -4,8 +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模型基类
package gmvc
type Model struct {

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视图基类
package gmvc
import (

8
g/net/ghttp/ghttp.go Normal file
View File

@ -0,0 +1,8 @@
// Copyright 2017 gf Author(https://gitee.com/johng/gf). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// 强大的HTTP Client及Server管理包
package ghttp

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.
package ghttp
import (

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
//
// IPv4管理
package gipv4
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.
// IPv6管理
package gipv6
import "gitee.com/johng/gf/g/util/gregx"

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
//
// 路由管理
package grouter
import (
@ -27,7 +28,6 @@ type Router struct {
prules *gmap.StringStringMap // 打包规则
}
func New() *Router {
return &Router{
drules : gmap.NewStringStringMap(),

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// 局域网端口扫描
package gscanner
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.
// SMTP
package gsmtp
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.
// TCP服务端
package gtcp
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.
// UDP服务端
package gudp
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 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",

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 grand
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 gregx
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 gutil
// 便利数组查找字符串索引位置,如果不存在则返回-1

View File

@ -3,7 +3,7 @@
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
//
// 通用数据验证工具
// 本来打算取名gvalidator的名字太长了缩写一下
/*
@ -50,7 +50,6 @@ in 格式in:value1,value2,... 说明:参
not-in 格式not-in:value1,value2,... 说明参数值不应该在value1,value2,...中(字符串匹配)
regex 格式regex:pattern 说明参数值应当满足正则匹配规则pattern
*/
package gvalid
import (