标准库

v1.10.0

诸多前人已对既有版本的标准库文档进行了部分翻译,有的文字功底极好,有的很明显对源码进行过非常深入的了解,实在自叹不如,所有参考过的文章以及博客链接都将显著标明在各包顶部,以表钦佩。

包列表

名称 概要
archive
tar 1.10.0tar包实现了对 tar 归档文件的访问。
zip 1.10.0zip包提供了对 ZIP 归档文件写入和读取的支持。
bufio 1.10.0bufio包实现了带缓冲的I/O操作。 它对io.Reader或io.Writer进行包装,同时返回一个Reader或Writer——返回的结果为文本I/O提供了缓冲功能,同时还提供了一些处理函数作为辅助。
builtin builtin包为Go的预声明的标识符提供了文档。
bytes 1.10.0bytes包实现了对字节切片的常用操作。
compress
bzip2 bzip2包实现了bzip2解压缩。
flate flate包实现了RFC 1951中描述的DEFLATE压缩数据格式。
gzip gzip实现读写RFC 1951中描述的gzip格式压缩文件。
lzw lzw实现了Lempel-Ziv-Welch压缩数据格式,在T.A.Welch的“高性能数据压缩技术”,Computer,17(6)(1984年6月),第8-19页中有描述。
zlib zlib实现了读写RFC 1950中描述的zlib格式压缩数据。
container
heap Package heap provides heap operations for any type that implements heap.Interface.
list Package list implements a doubly linked list.
ring Package ring implements operations on circular lists.
context Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.
crypto Package crypto collects common cryptographic constants.
aes Package aes implements AES encryption (formerly Rijndael), as defined in U.S. Federal Information Processing Standards Publication 197.
cipher 1.10.0Package cipher implements standard block cipher modes that can be wrapped around low-level block cipher implementations.
des Package des implements the Data Encryption Standard (DES) and the Triple Data Encryption Algorithm (TDEA) as defined in U.S. Federal Information Processing Standards Publication 46-3.
dsa Package dsa implements the Digital Signature Algorithm, as defined in FIPS 186-3.
ecdsa Package ecdsa implements the Elliptic Curve Digital Signature Algorithm, as defined in FIPS 186-3.
elliptic Package elliptic implements several standard elliptic curves over prime fields.
hmac Package hmac implements the Keyed-Hash Message Authentication Code (HMAC) as defined in U.S. Federal Information Processing Standards Publication 198.
md5 Package md5 implements the MD5 hash algorithm as defined in RFC 1321.
rand Package rand implements a cryptographically secure pseudorandom number generator.
rc4 Package rc4 implements RC4 encryption, as defined in Bruce Schneier's Applied Cryptography.
rsa Package rsa implements RSA encryption as specified in PKCS#1.
sha1 Package sha1 implements the SHA-1 hash algorithm as defined in RFC 3174.
sha256 Package sha256 implements the SHA224 and SHA256 hash algorithms as defined in FIPS 180-4.
sha512 Package sha512 implements the SHA-384, SHA-512, SHA-512/224, and SHA-512/256 hash algorithms as defined in FIPS 180-4.
subtle Package subtle implements functions that are often useful in cryptographic code but require careful thought to use correctly.
tls 1.10.0 Package tls partially implements TLS 1.2, as specified in RFC 5246.
x509 1.10.0 Package x509 parses X.509-encoded keys and certificates.
pkix 1.10.0 Package pkix contains shared, low level structures used for ASN.1 parsing and serialization of X.509 certificates, CRL and OCSP.
database
sql Package sql provides a generic interface around SQL (or SQL-like) databases.
driver 1.10.0 Package driver defines interfaces to be implemented by database drivers as used by package sql.
debug
dwarf 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
elf 1.10.0 Package elf implements access to ELF object files.
gosym Package gosym implements access to the Go symbol and line number tables embedded in Go binaries generated by the gc compilers.
macho 1.10.0 Package macho implements access to Mach-O object files.
pe Package pe implements access to PE (Microsoft Windows Portable Executable) files.
plan9obj Package plan9obj implements access to Plan 9 a.out object files.
encoding Package encoding defines interfaces shared by other packages that convert data to and from byte-level and textual representations.
ascii85 Package ascii85 implements the ascii85 data encoding as used in the btoa tool and Adobe's PostScript and PDF document formats.
asn1 1.10.0 Package asn1 implements parsing of DER-encoded ASN.1 data structures, as defined in ITU-T Rec X.690.
base32 Package base32 implements base32 encoding as specified by RFC 4648.
base64 Package base64 implements base64 encoding as specified by RFC 4648.
binary Package binary implements simple translation between numbers and byte sequences and encoding and decoding of varints.
csv 1.10.0 Package csv reads and writes comma-separated values (CSV) files.
gob Package gob manages streams of gobs - binary values exchanged between an Encoder (transmitter) and a Decoder (receiver).
hex 1.10.0 Package hex implements hexadecimal encoding and decoding.
json 1.10.0 Package json implements encoding and decoding of JSON as defined in RFC 4627.
pem 1.10.0 Package pem implements the PEM data encoding, which originated in Privacy Enhanced Mail.
xml 1.10.0 Package xml implements a simple XML 1.0 parser that understands XML name spaces.
errors Package errors implements functions to manipulate errors.
expvar Package expvar provides a standardized interface to public variables, such as operation counters in servers.
flag 1.10.0 Package flag implements command-line flag parsing.
fmt Package fmt implements formatted I/O with functions analogous to C's printf and scanf.
go
ast Package ast declares the types used to represent syntax trees for Go packages.
build Package build gathers information about Go packages.
constant Package constant implements Values representing untyped Go constants and their corresponding operations.
doc 1.10.0 Package doc extracts source code documentation from a Go AST.
format Package format implements standard formatting of Go source.
importer 1.10.0Package importer provides access to export data importers.
parser Package parser implements a parser for Go source files.
printer 1.10.0 Package printer implements printing of AST nodes.
scanner Package scanner implements a scanner for Go source text.
token Package token defines constants representing the lexical tokens of the Go programming language and basic operations on tokens (printing, predicates).
types Package types declares the data types and implements the algorithms for type-checking of Go packages.
hash 1.10.0 Package hash provides interfaces for hash functions.
adler32 Package adler32 implements the Adler-32 checksum.
crc32 Package crc32 implements the 32-bit cyclic redundancy check, or CRC-32, checksum.
crc64 Package crc64 implements the 64-bit cyclic redundancy check, or CRC-64, checksum.
fnv Package fnv implements FNV-1 and FNV-1a, non-cryptographic hash functions created by Glenn Fowler, Landon Curt Noll, and Phong Vo.
html Package html provides functions for escaping and unescaping HTML text.
template 1.10.0 Package template (html/template) implements data-driven templates for generating HTML output safe against code injection.
image Package image implements a basic 2-D image library.
color Package color implements a basic color library.
palette Package palette provides standard color palettes.
draw Package draw provides image composition functions.
gif Package gif implements a GIF image decoder and encoder.
jpeg Package jpeg implements a JPEG image decoder and encoder.
png Package png implements a PNG image decoder and encoder.
index
suffixarray Package suffixarray implements substring search in logarithmic time using an in-memory suffix array.
io Package io provides basic interfaces to I/O primitives.
ioutil Package ioutil implements some I/O utility functions.
log Package log implements a simple logging package.
syslog Package syslog provides a simple interface to the system log service.
math 1.10.0 Package math provides basic constants and mathematical functions.
big 1.10.0 Package big implements arbitrary-precision arithmetic (big numbers).
bits Package bits implements bit counting and manipulation functions for the predeclared unsigned integer types.
cmplx 1.10.0 Package cmplx provides basic constants and mathematical functions for complex numbers.
rand 1.10.0 Package rand implements pseudo-random number generators.
mime 1.10.0 Package mime implements parts of the MIME spec.
multipart 1.10.0 Package multipart implements MIME multipart parsing, as defined in RFC 2046.
quotedprintable Package quotedprintable implements quoted-printable encoding as specified by RFC 2045.
net 1.10.0 Package net provides a portable interface for network I/O, including TCP/IP, UDP, domain name resolution, and Unix domain sockets.
http 1.10.0 Package http provides HTTP client and server implementations.
cgi Package cgi implements CGI (Common Gateway Interface) as specified in RFC 3875.
cookiejar Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
fcgi Package fcgi implements the FastCGI protocol.
httptest Package httptest provides utilities for HTTP testing.
httptrace Package httptrace provides mechanisms to trace the events within HTTP client requests.
httputil Package httputil provides HTTP utility functions, complementing the more common ones in the net/http package.
pprof Package pprof serves via its HTTP server runtime profiling data in the format expected by the pprof visualization tool.
mail 1.10.0 Package mail implements parsing of mail messages.
rpc Package rpc provides access to the exported methods of an object across a network or other I/O connection.
jsonrpc Package jsonrpc implements a JSON-RPC 1.0 ClientCodec and ServerCodec for the rpc package.
smtp 1.10.0 Package smtp implements the Simple Mail Transfer Protocol as defined in RFC 5321.
textproto 1.10.0 Package textproto implements generic support for text-based request/response protocols in the style of HTTP, NNTP, and SMTP.
url 1.10.0 Package url parses URLs and implements query escaping.
os 1.10.0 Package os provides a platform-independent interface to operating system functionality.
exec Package exec runs external commands.
signal Package signal implements access to incoming signals.
user Package user allows user account lookups by name or id.
path Package path implements utility routines for manipulating slash-separated paths.
filepath Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths.
plugin Package plugin implements loading and symbol resolution of Go plugins.
reflect 1.10.0 Package reflect implements run-time reflection, allowing a program to manipulate objects with arbitrary types.
regexp Package regexp implements regular expression search.
syntax Package syntax parses regular expressions into parse trees and compiles parse trees into programs.
runtime Package runtime contains operations that interact with Go's runtime system, such as functions to control goroutines.
cgo Package cgo contains runtime support for code generated by the cgo tool.
debug Package debug contains facilities for programs to debug themselves while they are running.
msan
pprof 1.10.0 Package pprof writes runtime profiling data in the format expected by the pprof visualization tool.
race Package race implements data race detection logic.
trace Go execution tracer.
sort Package sort provides primitives for sorting slices and user-defined collections.
strconv 1.10.0 Package strconv implements conversions to and from string representations of basic data types.
strings 1.10.0 Package strings implements simple functions to manipulate UTF-8 encoded strings.
sync Package sync provides basic synchronization primitives such as mutual exclusion locks.
atomic Package atomic provides low-level atomic memory primitives useful for implementing synchronization algorithms.
syscall 1.10.0 Package syscall contains an interface to the low-level operating system primitives.
testing Package testing provides support for automated testing of Go packages.
iotest Package iotest implements Readers and Writers useful mainly for testing.
quick Package quick implements utility functions to help with black box testing.
text
scanner Package scanner provides a scanner and tokenizer for UTF-8-encoded text.
tabwriter Package tabwriter implements a write filter (tabwriter.Writer) that translates tabbed columns in input into properly aligned text.
template Package template implements data-driven templates for generating textual output.
parse Package parse builds parse trees for templates as defined by text/template and html/template.
time 1.10.0 Package time provides functionality for measuring and displaying time.
unicode 1.10.0 Package unicode provides data and functions to test some properties of Unicode code points.
utf16 Package utf16 implements encoding and decoding of UTF-16 sequences.
utf8 Package utf8 implements functions and constants to support text encoded in UTF-8.

其他包

子仓库

这些包同样是Go项目的一部分,但它们在Go的包目录之外。它们比标准库有更宽松的兼容性要求。 你可以使用 go get 下载和安装。