logo资料库

golang中文手册.pdf

第1页 / 共1002页
第2页 / 共1002页
第3页 / 共1002页
第4页 / 共1002页
第5页 / 共1002页
第6页 / 共1002页
第7页 / 共1002页
第8页 / 共1002页
资料共1002页,剩余部分请下载后查看
studygolang.com
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国
Go库文档
archive/tar
archive/zip
bufio
builtin
bytes
compress/bzip2
compress/flate
compress/gzip
compress/lzw
compress/zlib
container/heap
container/list
container/ring
context
crypto
crypto/aes
crypto/cipher
crypto/des
crypto/dsa
crypto/ecdsa
crypto/elliptic
crypto/hmac
crypto/md5
crypto/rand
crypto/rc4
crypto/rsa
crypto/sha1
crypto/sha256
crypto/sha512
crypto/subtle
crypto/tls
crypto/x509
crypto/x509/pkix
database/sql
database/sq/driver
debug/dwarf
debug/elf
debug/gosym
debug/macho
debug/pe
debug/plan9obj
encoding
encoding/ascii85
encoding/asn1
encoding/base32
encoding/base64
encoding/binary
encoding/csv
encoding/gob
encoding/hex
encoding/json
encoding/pem
encoding/xml
errors
expvar
flag
fmt
go/ast
go/build
go/constant
go/doc
go/format
go/importer
go/parser
go/printer
go/scanner
go/token
go/types
hash
hash/adler32
hash/crc32
hash/crc64
hash/fnv
html
html/template
image
image/color
image/color/palette
image/draw
image/gif
image/jpeg
image/png
index/suffixarray
io
io/ioutil
log
log/syslog
math
math/big
math/cmplx
math/rand
mime
mime/multipart
mime/quotedprintable
net
net/http
net/http/cgi
net/http/cookiejar
net/http/fcgi
net/http/httptest
net/http/httptrace
net_http_httputil
net_http_pprof
net/mail
net/rpc
net/rpc/jsonrpc
net/smtp
net/textproto
net/url
os
os/exec
os/signal
os/user
path
path/filepath
plugin
reflect
regexp
regexp/syntax
runtime
runtime/cgo
runtime/debug
runtime/pprof
runtime/race
runtime/trace
sort
strconv
strings
sync
sync/atomic
syscall
testing
testing/iotest
testing/quick
text/scanner
text/tabwriter
text/template
text/template/parse
time
unicode
unicode/utf16
unicode/utf8
unsafe
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 Go语言中文 网 首页 不显示目录 目录 archive/tar archive/zip bufio builtin bytes compress/bzi compress/flat compress/gzi compress/lzw compress/zlib container/hea container/list container/rin context crypto crypto/aes crypto/cipher crypto/des crypto/dsa crypto/ecdsa crypto/elliptic crypto/hmac crypto/md5 crypto/rand crypto/rc4 crypto/rsa crypto/sha1 crypto/sha25 crypto/sha51 crypto/subtle crypto/tls crypto/x509 crypto/x509/ database/sql database/sql/ Golang标准库文档 github 开源项目 欢迎有能力(翻译)的同学贡献,有何意见也可任意提出 子目录 标准库 其它包 子代码库 社区 标准库 名称 archive tar zip bufio builtin bytes compress bzip2 flate gzip lzw zlib container heap list ring context crypto aes 摘要 tar包实现了tar格式压缩文件的存取. zip包提供了zip档案文件的读写服务. bufio 包实现了带缓存的I/O操作. builtin 包为Go的预声明标识符提供了文档. bytes包实现了操作[]byte的常用函数. bzip2包实现bzip2的解压缩. flate包实现了deflate压缩数据格式,参见RFC 1951. gzip包实现了gzip格式压缩文件的读写,参见RFC 1952. lzw包实现了Lempel-Ziv-Welch数据压缩格式,这 是一种T. A. Welch在“A Technique for High- Performance Data Compression”一文 (Computer, 17(6) (June 1984), pp 8-19)提出 的一种压缩格式. zlib包实现了对zlib格式压缩数据的读写,参 见RFC 1950. heap包提供了对任意类型(实现 了heap.Interface接口)的堆操作. list包实现了双向链表. ring实现了环形链表的操作. Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes. crypto包搜集了常用的密码(算法)常量. aes包实现了AES加密算法,参见U.S. Federal Information Processing Standards Publication 197. https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 debug/dwarf debug/elf debug/gosym debug/macho debug/pe debug/plan9o encoding encoding/asc encoding/asn encoding/bas encoding/bas encoding/bin encoding/csv encoding/gob encoding/hex encoding/jso encoding/pem encoding/xm errors expvar flag fmt go/ast go/build go/constant go/doc go/format go/importer go/parser go/printer go/scanner go/token go/types hash hash/adler32 hash/crc32 hash/crc64 hash/fnv html html/templat image cipher des dsa ecdsa elliptic hmac md5 rand rc4 rsa sha1 sha256 sha512 subtle tls x509 pkix database sql driver debug dwarf elf gosym macho cipher包实现了多个标准的用于包装底层块加密算 法的加密算法实现. des包实现了DES标准和TDEA算法,参见U.S. Federal Information Processing Standards Publication 46-3. dsa包实现FIPS 186-3定义的数字签名算法 (Digital Signature Algorithm),即DSA算法. ecdsa包实现了椭圆曲线数字签名算法,参 见FIPS 186-3. elliptic包实现了几条覆盖素数有限域的标准椭圆 曲线. hmac包实现了U.S. Federal Information Processing Standards Publication 198规定 的HMAC(加密哈希信息认证码). md5包实现了MD5哈希算法,参见RFC 1321. rand包实现了用于加解密的更安全的随机数生成 器. rc4包实现了RC4加密算法,参见Bruce Schneier's Applied Cryptography. rsa包实现了PKCS#1规定的RSA加密算法. sha1包实现了SHA1哈希算法,参见RFC 3174. sha256包实现了SHA224和SHA256哈希算法,参 见FIPS 180-4. sha512包实现了SHA384和SHA512哈希算法,参 见FIPS 180-2. Package subtle implements functions that are often useful in cryptographic code but require careful thought to use correctly. tls包实现了TLS 1.2,细节参见RFC 5246. x509包解析X.509编码的证书和密钥. pkix包提供了共享的、低层次的结构体,用 于ASN.1解析和X.509证书、CRL、OCSP的序列 化. sql 包提供了通用的SQL(或类SQL)数据库接 口. driver包定义了应被数据库驱动实现的接口,这些 接口会被sql包使用. Package dwarf provides access to DWARF debugging information loaded from executable files, as defined in the DWARF 2.0 Standard at http://dwarfstd.org/doc/dwarf-2.0.0.pdf Package elf implements access to ELF object files. Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers. Package macho implements access to Mach-O https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 image/color image/color/ image/draw image/gif image/jpeg image/png index/suffixa io io/ioutil log log/syslog math math/big math/cmplx math/rand mime mime/multipa mime/quoted net net/http net/http/cgi net/http/coo net/http/fcgi net/http/http net/http/http net/http/http net/http/ppro net/mail net/rpc net/rpc/jsonr net/smtp net/textproto net/url os os/exec os/signal os/user path path/filepath plugin reflect regexp regexp/synta pe plan9obj encoding ascii85 asn1 base32 base64 binary csv gob hex json pem xml errors expvar flag fmt go ast build constant doc format importer parser printer object files. Package pe implements access to PE (Microsoft Windows Portable Executable) files. Package plan9obj implements access to Plan 9 a.out object files. encoding包定义了供其它包使用的可以将数据在 字节水平和文本表示之间转换的接口. ascii85 包是对 ascii85 的数据编码的实现. asn1包实现了DER编码的ASN.1数据结构的解 析,参见ITU-T Rec X.690. base32包实现了RFC 4648规定的base32编码. base64实现了RFC 4648规定的base64编码. binary包实现了简单的数字与字节序列的转换以及 变长值的编解码. csv读写逗号分隔值(csv)的文件. gob包管理gob流——在编码器(发送器)和解码 器(接受器)之间交换的binary值. hex包实现了16进制字符表示的编解码. json包实现了json对象的编解码,参见RFC 4627. pem包实现了PEM数据编码(源自保密增强邮件 协议). Package xml implements a simple XML 1.0 parser that understands XML name spaces. error 包实现了用于错误处理的函数. expvar包提供了公共变量的标准接口,如服务的 操作计数器. flag 包实现命令行标签解析. fmt 包实现了格式化I/O函数,类似于C的 printf 和 scanf. Package ast declares the types used to represent syntax trees for Go packages. Package build gathers information about Go packages. Package constant implements Values representing untyped Go constants and their corresponding operations. Package doc extracts source code documentation from a Go AST. Package format implements standard formatting of Go source. Package importer provides access to export data importers. Package parser implements a parser for Go source files. Package printer implements printing of AST nodes. scanner Package scanner implements a scanner for Go https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 runtime runtime/cgo runtime/debu runtime/ppro runtime/race runtime/trace sort strconv strings sync sync/atomic syscall testing testing/iotest testing/quick text/scanner text/tabwrite text/template text/template time unicode unicode/utf1 unicode/utf8 unsafe token types hash adler32 crc32 crc64 fnv html template image color palette draw gif jpeg png index suffixarray io ioutil log syslog math big cmplx rand mime multipart source text. Package token defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates). Package types declares the data types and implements the algorithms for type-checking of Go packages. hash包提供hash函数的接口. adler32包实现了Adler-32校验和算法,参见RFC 1950. crc32包实现了32位循环冗余校验(CRC-32)的 校验和算法. Package crc64 implements the 64-bit cyclic redundancy check, or CRC-64, checksum. fnv包实现了FNV-1和FNV-1a(非加密hash函 数). html包提供了用于转义和解转义HTML文本的函 数. template包(html/template)实现了数据驱动的 模板,用于生成可对抗代码注入的安全HTML输 出. image实现了基本的2D图片库. color 包实现了基本的颜色库。 palette包提供了标准的调色板. draw 包提供组装图片的方法. gif 包实现了GIF图片的解码. jpeg包实现了jpeg格式图像的编解码. png 包实现了PNG图像的编码和解码. suffixarrayb包通过使用内存中的后缀树实现了对 数级时间消耗的子字符串搜索. io 包为I/O原语提供了基础的接口. ioutil 实现了一些I/O的工具函数。 log包实现了简单的日志服务. syslog包提供一个简单的系统日志服务的接口. math 包提供了基本常数和数学函数。 big 包实现了(大数的)高精度运算. cmplx 包为复数提供了基本的常量和数学函数. rand 包实现了伪随机数生成器. mime实现了MIME的部分规定. multipart实现了MIME的multipart解析,参见RFC 2046. quotedprintable Package quotedprintable implements quoted- printable encoding as specified by RFC 2045. net http net包提供了可移植的网络I/O接口,包 括TCP/IP、UDP、域名解析和Unix域socket. http包提供了HTTP客户端和服务端的实现. https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 cgi cookiejar fcgi httptest httptrace httputil pprof mail rpc jsonrpc smtp textproto url os exec signal user path filepath plugin reflect regexp syntax runtime cgo debug pprof race trace sort cgi 包实现了RFC3875协议描述的CGI(公共网关 接口). cookiejar包实现了保管在内存中的符合RFC 6265标准的http.CookieJar接口. fcgi 包实现了FastCGI协议. httptest 包提供HTTP测试的单元工具. Package httptrace provides mechanisms to trace the events within HTTP client requests. httputil包提供了HTTP公用函数,是对net/http包 的更常见函数的补充. pprof 包通过提供HTTP服务返回runtime的统计数 据,这个数据是以pprof可视化工具规定的返回格 式返回的. mail 包实现了解析邮件消息的功能. rpc 包提供了一个方法来通过网络或者其他 的I/O连接进入对象的外部方法. jsonrpc 包使用了rpc的包实现了一个JSON- RPC的客户端解码器和服务端的解码器. smtp包实现了简单邮件传输协议(SMTP),参 见RFC 5321. textproto实现了对基于文本的请求/回复协议的一 般性支持,包括HTTP、NNTP和SMTP. url包解析URL并实现了查询的逸码,参见RFC 3986. os包提供了操作系统函数的不依赖平台的接口. exec包执行外部命令. signal包实现了对输入信号的访问. user包允许通过名称或ID查询用户帐户. path实现了对斜杠分隔的路径的实用操作函数. filepath包实现了兼容各操作系统的文件路径的实 用操作函数. Package plugin implements loading and symbol resolution of Go plugins. reflect包实现了运行时反射,允许程序操作任意类 型的对象. regexp包实现了正则表达式搜索. Package syntax parses regular expressions into parse trees and compiles parse trees into programs. TODO(osc): 需更新 runtime 包含与Go的运行时 系统进行交互的操作,例如用于控制Go程的函数. cgo 包含有 cgo 工具生成的代码的运行时支持. debug 包含有程序在运行时调试其自身的功能. pprof 包按照可视化工具 pprof 所要求的格式写出 运行时分析数据. race 包实现了数据竞争检测逻辑. Go execution tracer. sort 包为切片及用户定义的集合的排序操作提供 https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 了原语. strconv包实现了基本数据类型和其字符串表示的 相互转换. strings包实现了用于操作字符的简单函数. sync 包提供了互斥锁这类的基本的同步原语. atomic 包提供了底层的原子性内存原语,这对于 同步算法的实现很有用. Package syscall contains an interface to the low- level operating system primitives. Package testing provides support for automated testing of Go packages. Package iotest implements Readers and Writers useful mainly for testing. Package quick implements utility functions to help with black box testing. scanner包提供对utf-8文本的token扫描服务. tabwriter包实现了写入过滤器 (tabwriter.Writer),可以将输入的缩进修正为 正确的对齐文本. template包实现了数据驱动的用于生成文本输出 的模板. Package parse builds parse trees for templates as defined by text/template and html/template. time包提供了时间的显示和测量用的函数. unicode 包提供了一些测试Unicode码点属性的数 据和函数. utf16 包实现了对UTF-16序列的编码和解码。 utf8 包实现了支持UTF-8文本编码的函数和常量. unsafe 包含有关于Go程序类型安全的所有操作. strconv strings sync atomic syscall testing iotest quick text scanner tabwriter template parse time unicode utf16 utf8 unsafe 其它包 子代码库 这些包是 Go 项目的一部分,但并未在主源码树中。它们在比 Go 核心库更加宽 松的兼容性需求下开发。 可通过“go get”安装它们,子代码库的文档和源码可通 过相应的链接访问 crypto — 附加的加密包。 image — 附加的图像包。 net — 附加的网络包。 sys — 系统调用包。 text — 文本处理包。 tools — godoc、vet、cover 及其它工具。 exp — 实验性代码(可能不经警告就更改,请小心对待)。 社区 https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 这些服务可帮你寻找社区提供的开源包。 GoDoc - 包索引与搜索引擎。 Go 搜索 - 代码搜索引擎。 Go 维基上的项目 - Go 项目策划列表 https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
Go语言标准库文档中文版 | Go语言中文网 | Golang中文社区 | Golang中国 https://studygolang.com/pkgdoc[2018/8/16 星期四 17:21:44]
分享到:
收藏