From 72569321fa027ca55272cfbf26fdc5071704dbff Mon Sep 17 00:00:00 2001 From: John Date: Wed, 16 Jan 2019 13:35:16 +0800 Subject: [PATCH] package comments update --- g/container/garray/garray.go | 1 + g/container/gchan/gchan.go | 1 + g/container/glist/glist.go | 1 + g/container/gmap/gmap.go | 1 + g/container/gpool/gpool.go | 1 + g/container/gqueue/gqueue.go | 21 +++++++++++++-------- g/container/gring/gring.go | 1 + g/container/gset/gset.go | 1 + g/container/gtype/gtype.go | 1 + g/container/gvar/gvar.go | 1 + g/crypto/gaes/gaes.go | 1 - g/crypto/gcrc32/gcrc32.go | 1 - g/crypto/gmd5/gmd5.go | 1 - g/crypto/gsha1/gsha1.go | 1 - g/database/gdb/gdb.go | 3 ++- g/database/gkafka/gkafka.go | 1 + g/database/gredis/gredis.go | 3 ++- g/encoding/gbase64/gbase64.go | 1 - g/encoding/gbinary/gbinary.go | 1 - g/encoding/gcharset/gcharset.go | 3 ++- g/encoding/gcompress/gcompress.go | 1 + g/encoding/ghash/ghash.go | 1 + g/encoding/ghtml/ghtml.go | 1 + g/encoding/gjson/gjson.go | 1 - g/encoding/gparser/gparser.go | 1 - g/encoding/gtoml/gtoml.go | 1 - g/encoding/gurl/url.go | 1 - g/encoding/gxml/gxml.go | 1 - g/encoding/gyaml/gyaml.go | 1 - g/frame/gins/gins.go | 1 + g/frame/gmvc/controller.go | 1 - g/net/gipv4/gipv4.go | 1 - g/net/gipv6/gipv6.go | 1 - g/net/gscanner/scanner.go | 1 - g/net/gsmtp/smtp.go | 1 - g/net/gtcp/gtcp.go | 1 - g/net/gudp/gudp.go | 1 - g/os/gcache/gcache.go | 5 +++-- g/os/gcfg/gcfg.go | 3 ++- g/os/gcmd/gcmd.go | 1 + g/os/gcron/gcron.go | 1 + g/os/genv/genv.go | 1 + g/os/gfcache/gfcache.go | 1 + g/os/gfile/gfile.go | 1 + g/os/gflock/gflock.go | 1 + g/os/gfpool/gfpool.go | 1 + g/os/gfsnotify/gfsnotify.go | 1 + g/os/glog/glog.go | 3 ++- g/os/gmlock/gmlock.go | 1 + g/os/gproc/gproc.go | 5 +++-- g/os/grpool/grpool.go | 3 ++- g/os/gspath/gspath.go | 3 ++- g/os/gtime/gtime.go | 1 + g/os/gtimer/gtimer.go | 3 ++- g/os/gview/gview.go | 3 ++- g/util/gconv/gconv.go | 3 ++- g/util/gpage/gpage.go | 1 + g/util/grand/grand.go | 1 + g/util/gregex/gregex.go | 1 + g/util/gstr/gstr.go | 1 + g/util/gtest/gtest.go | 1 + g/util/gutil/gutil.go | 3 ++- g/util/gvalid/gvalid.go | 3 ++- 63 files changed, 72 insertions(+), 43 deletions(-) diff --git a/g/container/garray/garray.go b/g/container/garray/garray.go index d7865487e..2f87a97b9 100644 --- a/g/container/garray/garray.go +++ b/g/container/garray/garray.go @@ -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 diff --git a/g/container/gchan/gchan.go b/g/container/gchan/gchan.go index 63aba678d..29142ed9c 100644 --- a/g/container/gchan/gchan.go +++ b/g/container/gchan/gchan.go @@ -5,6 +5,7 @@ // You can obtain one at https://gitee.com/johng/gf. // Package gchan provides graceful operations for channel. +// // 优雅的Channel操作. package gchan diff --git a/g/container/glist/glist.go b/g/container/glist/glist.go index 278664f50..d27843091 100644 --- a/g/container/glist/glist.go +++ b/g/container/glist/glist.go @@ -6,6 +6,7 @@ // // Package glist provides a concurrent-safe(alternative) doubly linked list. +// // 并发安全的双向链表. package glist diff --git a/g/container/gmap/gmap.go b/g/container/gmap/gmap.go index 479ad9b5a..e149f35ec 100644 --- a/g/container/gmap/gmap.go +++ b/g/container/gmap/gmap.go @@ -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 diff --git a/g/container/gpool/gpool.go b/g/container/gpool/gpool.go index 96203dd04..844e0acfe 100644 --- a/g/container/gpool/gpool.go +++ b/g/container/gpool/gpool.go @@ -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 diff --git a/g/container/gqueue/gqueue.go b/g/container/gqueue/gqueue.go index 2095300a8..257ce8235 100644 --- a/g/container/gqueue/gqueue.go +++ b/g/container/gqueue/gqueue.go @@ -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 // 队列限制大小 diff --git a/g/container/gring/gring.go b/g/container/gring/gring.go index c9571bc6c..92df5a60b 100644 --- a/g/container/gring/gring.go +++ b/g/container/gring/gring.go @@ -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 diff --git a/g/container/gset/gset.go b/g/container/gset/gset.go index 422c2d02d..2020e089d 100644 --- a/g/container/gset/gset.go +++ b/g/container/gset/gset.go @@ -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 diff --git a/g/container/gtype/gtype.go b/g/container/gtype/gtype.go index 74bd81f03..aa071f90e 100644 --- a/g/container/gtype/gtype.go +++ b/g/container/gtype/gtype.go @@ -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 diff --git a/g/container/gvar/gvar.go b/g/container/gvar/gvar.go index 5b5544bd3..5d9b8ffe2 100644 --- a/g/container/gvar/gvar.go +++ b/g/container/gvar/gvar.go @@ -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 diff --git a/g/crypto/gaes/gaes.go b/g/crypto/gaes/gaes.go index 0d92c66b1..4bbf17a9c 100644 --- a/g/crypto/gaes/gaes.go +++ b/g/crypto/gaes/gaes.go @@ -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 ( diff --git a/g/crypto/gcrc32/gcrc32.go b/g/crypto/gcrc32/gcrc32.go index dad169e0c..ef11effe3 100644 --- a/g/crypto/gcrc32/gcrc32.go +++ b/g/crypto/gcrc32/gcrc32.go @@ -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 ( diff --git a/g/crypto/gmd5/gmd5.go b/g/crypto/gmd5/gmd5.go index b716abcc2..c9eff7ada 100644 --- a/g/crypto/gmd5/gmd5.go +++ b/g/crypto/gmd5/gmd5.go @@ -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 ( diff --git a/g/crypto/gsha1/gsha1.go b/g/crypto/gsha1/gsha1.go index 765c368fd..4dc3cbde1 100644 --- a/g/crypto/gsha1/gsha1.go +++ b/g/crypto/gsha1/gsha1.go @@ -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 ( diff --git a/g/database/gdb/gdb.go b/g/database/gdb/gdb.go index d23d7ca9f..68f45bb31 100644 --- a/g/database/gdb/gdb.go +++ b/g/database/gdb/gdb.go @@ -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 diff --git a/g/database/gkafka/gkafka.go b/g/database/gkafka/gkafka.go index 54a721bb2..7d69df6cb 100644 --- a/g/database/gkafka/gkafka.go +++ b/g/database/gkafka/gkafka.go @@ -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 diff --git a/g/database/gredis/gredis.go b/g/database/gredis/gredis.go index af9a18869..884ed11e4 100644 --- a/g/database/gredis/gredis.go +++ b/g/database/gredis/gredis.go @@ -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 ( diff --git a/g/encoding/gbase64/gbase64.go b/g/encoding/gbase64/gbase64.go index 04388b1c5..77eb77ed7 100644 --- a/g/encoding/gbase64/gbase64.go +++ b/g/encoding/gbase64/gbase64.go @@ -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 ( diff --git a/g/encoding/gbinary/gbinary.go b/g/encoding/gbinary/gbinary.go index d0e4729cc..bfe247fb7 100644 --- a/g/encoding/gbinary/gbinary.go +++ b/g/encoding/gbinary/gbinary.go @@ -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 ( diff --git a/g/encoding/gcharset/gcharset.go b/g/encoding/gcharset/gcharset.go index b6708557a..4d3a0c00a 100644 --- a/g/encoding/gcharset/gcharset.go +++ b/g/encoding/gcharset/gcharset.go @@ -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 diff --git a/g/encoding/gcompress/gcompress.go b/g/encoding/gcompress/gcompress.go index 7e240494d..16ad741d0 100644 --- a/g/encoding/gcompress/gcompress.go +++ b/g/encoding/gcompress/gcompress.go @@ -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 diff --git a/g/encoding/ghash/ghash.go b/g/encoding/ghash/ghash.go index 2d5f8dd89..69d2cf1ea 100644 --- a/g/encoding/ghash/ghash.go +++ b/g/encoding/ghash/ghash.go @@ -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 diff --git a/g/encoding/ghtml/ghtml.go b/g/encoding/ghtml/ghtml.go index b7392a564..370118943 100644 --- a/g/encoding/ghtml/ghtml.go +++ b/g/encoding/ghtml/ghtml.go @@ -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 diff --git a/g/encoding/gjson/gjson.go b/g/encoding/gjson/gjson.go index 4566512ce..dabb85548 100644 --- a/g/encoding/gjson/gjson.go +++ b/g/encoding/gjson/gjson.go @@ -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 ( diff --git a/g/encoding/gparser/gparser.go b/g/encoding/gparser/gparser.go index 98cae703b..6682bd59a 100644 --- a/g/encoding/gparser/gparser.go +++ b/g/encoding/gparser/gparser.go @@ -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 ( diff --git a/g/encoding/gtoml/gtoml.go b/g/encoding/gtoml/gtoml.go index 9ffbc5263..9d95e84aa 100644 --- a/g/encoding/gtoml/gtoml.go +++ b/g/encoding/gtoml/gtoml.go @@ -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 ( diff --git a/g/encoding/gurl/url.go b/g/encoding/gurl/url.go index fe15d230e..65bf2eea4 100644 --- a/g/encoding/gurl/url.go +++ b/g/encoding/gurl/url.go @@ -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" diff --git a/g/encoding/gxml/gxml.go b/g/encoding/gxml/gxml.go index 95b4434cd..351aa838f 100644 --- a/g/encoding/gxml/gxml.go +++ b/g/encoding/gxml/gxml.go @@ -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 ( diff --git a/g/encoding/gyaml/gyaml.go b/g/encoding/gyaml/gyaml.go index 49eb8cbbb..0896fd8fb 100644 --- a/g/encoding/gyaml/gyaml.go +++ b/g/encoding/gyaml/gyaml.go @@ -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" diff --git a/g/frame/gins/gins.go b/g/frame/gins/gins.go index 5d88a9812..2c9adc2f5 100644 --- a/g/frame/gins/gins.go +++ b/g/frame/gins/gins.go @@ -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 diff --git a/g/frame/gmvc/controller.go b/g/frame/gmvc/controller.go index 9913b798b..e62c2072c 100644 --- a/g/frame/gmvc/controller.go +++ b/g/frame/gmvc/controller.go @@ -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 ( diff --git a/g/net/gipv4/gipv4.go b/g/net/gipv4/gipv4.go index b068bc962..4aeeb70e1 100644 --- a/g/net/gipv4/gipv4.go +++ b/g/net/gipv4/gipv4.go @@ -6,7 +6,6 @@ // // Package gipv4 provides useful API for IPv4 address handling. -// IPv4. package gipv4 import ( diff --git a/g/net/gipv6/gipv6.go b/g/net/gipv6/gipv6.go index 8c32d3a0f..58bab6af3 100644 --- a/g/net/gipv6/gipv6.go +++ b/g/net/gipv6/gipv6.go @@ -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" diff --git a/g/net/gscanner/scanner.go b/g/net/gscanner/scanner.go index 8385827fd..8d6caed94 100644 --- a/g/net/gscanner/scanner.go +++ b/g/net/gscanner/scanner.go @@ -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 ( diff --git a/g/net/gsmtp/smtp.go b/g/net/gsmtp/smtp.go index 774029d0d..e012ebbd7 100644 --- a/g/net/gsmtp/smtp.go +++ b/g/net/gsmtp/smtp.go @@ -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 ( diff --git a/g/net/gtcp/gtcp.go b/g/net/gtcp/gtcp.go index 0136d77e8..bde28ef95 100644 --- a/g/net/gtcp/gtcp.go +++ b/g/net/gtcp/gtcp.go @@ -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 diff --git a/g/net/gudp/gudp.go b/g/net/gudp/gudp.go index 2b95536ec..442931413 100644 --- a/g/net/gudp/gudp.go +++ b/g/net/gudp/gudp.go @@ -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 diff --git a/g/os/gcache/gcache.go b/g/os/gcache/gcache.go index 60e9898b1..fa2c270da 100644 --- a/g/os/gcache/gcache.go +++ b/g/os/gcache/gcache.go @@ -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 diff --git a/g/os/gcfg/gcfg.go b/g/os/gcfg/gcfg.go index cae828e68..c18fff811 100644 --- a/g/os/gcfg/gcfg.go +++ b/g/os/gcfg/gcfg.go @@ -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 diff --git a/g/os/gcmd/gcmd.go b/g/os/gcmd/gcmd.go index d5aded552..f41af3053 100644 --- a/g/os/gcmd/gcmd.go +++ b/g/os/gcmd/gcmd.go @@ -6,6 +6,7 @@ // // Package gcmd provides console operations, like options/values reading and command running. +// // 命令行管理. package gcmd diff --git a/g/os/gcron/gcron.go b/g/os/gcron/gcron.go index e72d76532..6c8eff514 100644 --- a/g/os/gcron/gcron.go +++ b/g/os/gcron/gcron.go @@ -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 diff --git a/g/os/genv/genv.go b/g/os/genv/genv.go index 9df2bd738..89f8c694c 100644 --- a/g/os/genv/genv.go +++ b/g/os/genv/genv.go @@ -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 diff --git a/g/os/gfcache/gfcache.go b/g/os/gfcache/gfcache.go index 61322ed2e..ffd7891d9 100644 --- a/g/os/gfcache/gfcache.go +++ b/g/os/gfcache/gfcache.go @@ -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 diff --git a/g/os/gfile/gfile.go b/g/os/gfile/gfile.go index 81d9713a7..e98354552 100644 --- a/g/os/gfile/gfile.go +++ b/g/os/gfile/gfile.go @@ -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 diff --git a/g/os/gflock/gflock.go b/g/os/gflock/gflock.go index 9f56b1856..f21132d4e 100644 --- a/g/os/gflock/gflock.go +++ b/g/os/gflock/gflock.go @@ -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 diff --git a/g/os/gfpool/gfpool.go b/g/os/gfpool/gfpool.go index ace3bf31a..6f7dacd88 100644 --- a/g/os/gfpool/gfpool.go +++ b/g/os/gfpool/gfpool.go @@ -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 diff --git a/g/os/gfsnotify/gfsnotify.go b/g/os/gfsnotify/gfsnotify.go index 14c425562..71ecbdaa6 100644 --- a/g/os/gfsnotify/gfsnotify.go +++ b/g/os/gfsnotify/gfsnotify.go @@ -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 diff --git a/g/os/glog/glog.go b/g/os/glog/glog.go index 2865a82b5..bee27be35 100644 --- a/g/os/glog/glog.go +++ b/g/os/glog/glog.go @@ -6,7 +6,8 @@ // @author john, zseeker // Package glog implements powerful and easy-to-use levelled logging functionality. -// 日志模块. +// +// 日志模块, // 直接文件/输出操作,没有异步逻辑,没有使用缓存或者通道 package glog diff --git a/g/os/gmlock/gmlock.go b/g/os/gmlock/gmlock.go index c23e11085..54c6c58f0 100644 --- a/g/os/gmlock/gmlock.go +++ b/g/os/gmlock/gmlock.go @@ -5,6 +5,7 @@ // You can obtain one at https://gitee.com/johng/gf. // Package gmlock implements a thread-safe memory locker. +// // 内存锁. package gmlock diff --git a/g/os/gproc/gproc.go b/g/os/gproc/gproc.go index 4328759e4..af6e28130 100644 --- a/g/os/gproc/gproc.go +++ b/g/os/gproc/gproc.go @@ -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 diff --git a/g/os/grpool/grpool.go b/g/os/grpool/grpool.go index 7b52a0f26..78b084d3b 100644 --- a/g/os/grpool/grpool.go +++ b/g/os/grpool/grpool.go @@ -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 diff --git a/g/os/gspath/gspath.go b/g/os/gspath/gspath.go index c12c221c5..da5ffff01 100644 --- a/g/os/gspath/gspath.go +++ b/g/os/gspath/gspath.go @@ -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 diff --git a/g/os/gtime/gtime.go b/g/os/gtime/gtime.go index cb55d0d21..81171553f 100644 --- a/g/os/gtime/gtime.go +++ b/g/os/gtime/gtime.go @@ -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 diff --git a/g/os/gtimer/gtimer.go b/g/os/gtimer/gtimer.go index 3e7a333da..aea932b4e 100644 --- a/g/os/gtimer/gtimer.go +++ b/g/os/gtimer/gtimer.go @@ -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 diff --git a/g/os/gview/gview.go b/g/os/gview/gview.go index edc3017bd..0b379cc13 100644 --- a/g/os/gview/gview.go +++ b/g/os/gview/gview.go @@ -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 ( diff --git a/g/util/gconv/gconv.go b/g/util/gconv/gconv.go index c1a0b8f55..140fc1364 100644 --- a/g/util/gconv/gconv.go +++ b/g/util/gconv/gconv.go @@ -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 diff --git a/g/util/gpage/gpage.go b/g/util/gpage/gpage.go index 077fa2aef..3e45cfaaf 100644 --- a/g/util/gpage/gpage.go +++ b/g/util/gpage/gpage.go @@ -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 diff --git a/g/util/grand/grand.go b/g/util/grand/grand.go index 562553e8c..ed492f6ea 100644 --- a/g/util/grand/grand.go +++ b/g/util/grand/grand.go @@ -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 diff --git a/g/util/gregex/gregex.go b/g/util/gregex/gregex.go index 40508b23f..10b2ddb1d 100644 --- a/g/util/gregex/gregex.go +++ b/g/util/gregex/gregex.go @@ -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 diff --git a/g/util/gstr/gstr.go b/g/util/gstr/gstr.go index 483a9a6e2..aec98176d 100644 --- a/g/util/gstr/gstr.go +++ b/g/util/gstr/gstr.go @@ -5,6 +5,7 @@ // You can obtain one at https://gitee.com/johng/gf. // Package gstr provides useful API for string handling. +// // 字符串操作. package gstr diff --git a/g/util/gtest/gtest.go b/g/util/gtest/gtest.go index f91d85689..4a59fe783 100644 --- a/g/util/gtest/gtest.go +++ b/g/util/gtest/gtest.go @@ -5,6 +5,7 @@ // You can obtain one at https://gitee.com/johng/gf. // Package gtest provides simple and useful test utils. +// // 测试模块. package gtest diff --git a/g/util/gutil/gutil.go b/g/util/gutil/gutil.go index c8f11b0f9..c503264be 100644 --- a/g/util/gutil/gutil.go +++ b/g/util/gutil/gutil.go @@ -5,7 +5,8 @@ // You can obtain one at https://gitee.com/johng/gf. // Package gutil provides some uncategorized util functions. -// 工具包 +// +// 工具包. package gutil import ( diff --git a/g/util/gvalid/gvalid.go b/g/util/gvalid/gvalid.go index 7f5c1d3c0..4e471848c 100644 --- a/g/util/gvalid/gvalid.go +++ b/g/util/gvalid/gvalid.go @@ -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 (