mirror of
https://gitee.com/johng/gf.git
synced 2024-11-30 03:07:45 +08:00
package comments update
This commit is contained in:
parent
1600a80124
commit
72569321fa
@ -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
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
|
||||
// Package gchan provides graceful operations for channel.
|
||||
//
|
||||
// 优雅的Channel操作.
|
||||
package gchan
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
// Package glist provides a concurrent-safe(alternative) doubly linked list.
|
||||
//
|
||||
// 并发安全的双向链表.
|
||||
package glist
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 // 队列限制大小
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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"
|
||||
|
@ -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 (
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -6,7 +6,6 @@
|
||||
//
|
||||
|
||||
// Package gipv4 provides useful API for IPv4 address handling.
|
||||
// IPv4.
|
||||
package gipv4
|
||||
|
||||
import (
|
||||
|
@ -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"
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
// Package gcmd provides console operations, like options/values reading and command running.
|
||||
//
|
||||
// 命令行管理.
|
||||
package gcmd
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
// @author john, zseeker
|
||||
|
||||
// Package glog implements powerful and easy-to-use levelled logging functionality.
|
||||
// 日志模块.
|
||||
//
|
||||
// 日志模块,
|
||||
// 直接文件/输出操作,没有异步逻辑,没有使用缓存或者通道
|
||||
package glog
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
|
||||
// Package gmlock implements a thread-safe memory locker.
|
||||
//
|
||||
// 内存锁.
|
||||
package gmlock
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
|
||||
// Package gstr provides useful API for string handling.
|
||||
//
|
||||
// 字符串操作.
|
||||
package gstr
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
|
||||
// Package gtest provides simple and useful test utils.
|
||||
//
|
||||
// 测试模块.
|
||||
package gtest
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
// You can obtain one at https://gitee.com/johng/gf.
|
||||
|
||||
// Package gutil provides some uncategorized util functions.
|
||||
// 工具包
|
||||
//
|
||||
// 工具包.
|
||||
package gutil
|
||||
|
||||
import (
|
||||
|
@ -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 (
|
||||
|
Loading…
Reference in New Issue
Block a user