package comments update

This commit is contained in:
John 2019-01-16 13:35:16 +08:00
parent 1600a80124
commit 72569321fa
63 changed files with 72 additions and 43 deletions

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package garray provides kinds of concurrent-safe(alternative) arrays.
//
// 并发安全的数组.
package garray

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gchan provides graceful operations for channel.
//
// 优雅的Channel操作.
package gchan

View File

@ -6,6 +6,7 @@
//
// Package glist provides a concurrent-safe(alternative) doubly linked list.
//
// 并发安全的双向链表.
package glist

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gmap provides kinds of concurrent-safe(alternative) maps.
//
// 并发安全的哈希MAP.
package gmap

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gpool provides a object-reusable concurrent-safe pool.
//
// 对象复用池.
package gpool

View File

@ -5,11 +5,13 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gqueue provides a dynamic/static concurrent-safe(alternative) queue.
//
// 并发安全的动态队列.
// 特点:
// 1、动态队列初始化速度快
// 2、动态的队列大小(不限大小)
// 3、取数据时如果队列为空那么会阻塞等待
//
// 特点:
// 1. 动态队列初始化速度快;
// 2. 动态的队列大小(不限大小)
// 3. 取数据时如果队列为空那么会阻塞等待;
package gqueue
import (
@ -18,10 +20,13 @@ import (
"sync"
)
// 0、这是一个先进先出的队列(chan <-- list)
// 1、当创建Queue对象时限定大小那么等同于一个同步的chan并发安全队列
// 2、不限制大小时list链表用以存储数据临时chan负责为客户端读取数据当从chan获取数据时list往chan中不停补充数据
// 3、由于功能主体是chan那么操作仍然像chan那样具有阻塞效果
// 1、这是一个先进先出的队列(chan <-- list)
//
// 2、当创建Queue对象时限定大小那么等同于一个同步的chan并发安全队列
//
// 3、不限制大小时list链表用以存储数据临时chan负责为客户端读取数据当从chan获取数据时list往chan中不停补充数据
//
// 4、由于功能主体是chan那么操作仍然像chan那样具有阻塞效果
type Queue struct {
mu sync.Mutex // 底层链表写锁
limit int // 队列限制大小

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gring provides a concurrent-safe(alternative) ring(circular lists).
//
// 并发安全环.
package gring

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gset provides kinds of concurrent-safe(alternative) sets.
//
// 并发安全集合.
package gset

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtype provides kinds of high performance, concurrent-safe basic variable types.
//
// 并发安全基本类型.
package gtype

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gvar provides an universal variable type, like generics.
//
// 通用动态变量.
package gvar

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gaes provides useful API for AES encryption/decryption algorithms.
// AES算法.
package gaes
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gcrc32 provides useful API for CRC32 encryption/decryption algorithms.
// CRC32算法.
package gcrc32
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gmd5 provides useful API for MD5 encryption/decryption algorithms.
// MD5算法.
package gmd5
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gsha1 provides useful API for SHA1 encryption/decryption algorithms.
// SHA1算法.
package gsha1
import (

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gdb provides ORM features for popular relationship databases.
// 数据库ORM.
//
// 数据库ORM,
// 默认内置支持MySQL, 其他数据库需要手动import对应的数据库引擎第三方包.
package gdb

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gkafka provides producer and consumer client for kafka server.
//
// Kafka客户端.
package gkafka

View File

@ -5,8 +5,9 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gredis provides client for redis server.
//
// Redis客户端.
// Redis中文手册文档请参考http://redisdoc.com/ Redis官方命令请参考https://redis.io/commands
// Redis中文手册文档请参考http://redisdoc.com/ , Redis官方命令请参考https://redis.io/commands
package gredis
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gbase64 provides useful API for BASE64 encoding/decoding algorithms.
// BASE64
package gbase64
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gbinary provides useful API for handling binary/bytes data.
// 二进制及byte操作
package gbinary
import (

View File

@ -7,7 +7,8 @@
// @date 20180604
// Package gcharset provides converting string to requested character encoding.
// 字符集转换方法.
//
// 字符集转换方法,
// 使用mahonia实现的字符集转换方法支持的字符集包括常见的utf8/UTF-16/UTF-16LE/macintosh/big5/gbk/gb18030,支持的全量字符集可以参考mahonia包
package gcharset

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gcompress provides kinds of compression algorithms for binary/bytes data.
//
// 数据压缩/解压.
package gcompress

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package ghash provides some popular hash functions(uint32/uint64) in go.
//
// 常用的hash函数.
package ghash

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package ghtml provides useful API for HTML content handling.
//
// HTML编码.
package ghtml

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gjson provides quite flexible and useful API for JSON/XML/YAML/TOML content handling.
// JSON解析/封装.
package gjson
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gp.
// Package gparser provides a flexible and easy way for accessing/converting variable and JSON/XML/YAML/TOML contents.
// 数据文件编码/解析.
package gparser
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtoml provides accessing and converting for TOML content.
// TOML.
package gtoml
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gurl provides useful API for URL handling.
// URL编码.
package gurl
import "net/url"

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gxml provides accessing and converting for XML content.
// XML.
package gxml
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gyaml provides accessing and converting for YAML content.
// YAML.
package gyaml
import "gitee.com/johng/gf/third/github.com/ghodss/yaml"

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gins provides instances management and some core components.
//
// 单例对象管理.
// 框架内置了一些核心对象获取方法并且可以通过Set和Get方法实现IoC以及对内置核心对象的自定义替换
package gins

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gmvc provides basic object classes for MVC.
// MVC.
package gmvc
import (

View File

@ -6,7 +6,6 @@
//
// Package gipv4 provides useful API for IPv4 address handling.
// IPv4.
package gipv4
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gipv4 provides useful API for IPv6 address handling.
// IPv6.
package gipv6
import "gitee.com/johng/gf/g/util/gregex"

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gscanner provides a port scanner for local intranet.
// IP扫描器.
package gscanner
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gsmtp provides a SMTP client to access remote mail server.
// SMTP.
package gsmtp
import (

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtcp provides TCP server and client implementations.
// TCP服务端.
package gtcp

View File

@ -5,7 +5,6 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtcp provides UDP server and client implementations.
// UDP.
package gudp

View File

@ -4,8 +4,9 @@
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://gitee.com/johng/gf.
// Package gcache provides high performance in-memory cache for process.
// 缓存模块.
// Package gcache provides high performance and concurrent-safe in-memory cache for process.
//
// 缓存模块,
// 并发安全的单进程高速缓存.
package gcache

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gcfg provides reading, caching and managing for configuration files.
// 配置管理.
//
// 配置管理,
// 配置文件格式支持json, xml, toml, yaml/yml
package gcfg

View File

@ -6,6 +6,7 @@
//
// Package gcmd provides console operations, like options/values reading and command running.
//
// 命令行管理.
package gcmd

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gcron implements a cron pattern parser and job runner.
//
// 定时任务.
package gcron

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package genv provides operations for environment variables of system.
//
// 环境变量管理
package genv

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gfcache provides reading and caching for file contents.
//
// 文件缓存.
package gfcache

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gfile provides easy-to-use operations for file system.
//
// 文件管理.
package gfile

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gflock implements a thread-safe sync.Locker interface for file locking.
//
// 文件锁.
package gflock

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gfpool provides io-reusable pool for file pointer.
//
// 文件指针池.
package gfpool

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gfsnotify provides a platform-independent interface for file system notifications.
//
// 文件监控.
package gfsnotify

View File

@ -6,7 +6,8 @@
// @author john, zseeker
// Package glog implements powerful and easy-to-use levelled logging functionality.
// 日志模块.
//
// 日志模块,
// 直接文件/输出操作,没有异步逻辑,没有使用缓存或者通道
package glog

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gmlock implements a thread-safe memory locker.
//
// 内存锁.
package gmlock

View File

@ -5,8 +5,9 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gproc implements communication and management of processes.
// 进程管理/通信.
// 本进程管理从syscall, os.StartProcess, exec.Cmd都使用过
//
// 进程管理/通信,
// 本进程管理从syscall, os.StartProcess, exec.Cmd都使用过,
// 最后采用了exec.Cmd来实现多进程管理这是一个顶层的跨平台封装兼容性更好另外两个是偏底层的接口。
package gproc

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package grpool implements a goroutine reusable pool.
// Goroutine池.
//
// Goroutine池,
// 用于goroutine复用提升异步操作执行效率(避免goroutine限制并节约内存开销).
// 需要注意的是grpool提供给的公共池不提供关闭方法自创建的池可以手动关闭掉。
package grpool

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gspath implements file index and search for folders.
// 搜索目录管理.
//
// 搜索目录管理,
// 可以添加搜索目录,按照添加的优先级进行文件检索,并在内部进行高效缓存处理。
package gspath

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtime provides functionality for measuring and displaying time.
//
// 时间管理.
package gtime

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtimer implements Levelled Timing Wheel for interval/delayed jobs running and management.
// 任务定时器(分层时间轮).
//
// 任务定时器(分层时间轮),
// 高效的时间轮任务管理模块,用于管理间隔/延迟运行任务。
// 与gcron模块的区别是时间轮模块只管理间隔执行任务并且更注重执行效率(纳秒级别)。
// 需要注意执行时间间隔的准确性问题: https://github.com/golang/go/issues/14410

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gview implements a template engine based on text/template.
// 视图管理.
//
// 模板引擎.
package gview
import (

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gconv implements powerful and easy-to-use converting functionality for any types of variables.
// 类型转换.
//
// 类型转换,
// 内部使用了bytes作为底层转换类型效率很高。
package gconv

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gpage provides useful paging functionality for web pages.
//
// 分页管理.
package gpage

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package grand provides high performance API for random functionality.
//
// 随机数管理.
package grand

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gregex provides high performance API for regular expression functionality.
//
// 正则表达式.
package gregex

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gstr provides useful API for string handling.
//
// 字符串操作.
package gstr

View File

@ -5,6 +5,7 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gtest provides simple and useful test utils.
//
// 测试模块.
package gtest

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gutil provides some uncategorized util functions.
// 工具包
//
// 工具包.
package gutil
import (

View File

@ -5,7 +5,8 @@
// You can obtain one at https://gitee.com/johng/gf.
// Package gvalid implements powerful and useful data/form validation functionality.
// 数据校验.
//
// 数据/表单校验.
package gvalid
import (