...

Packages

子目录

标准库

名称      摘要
archive     
     tar      tar包实现了tar格式压缩文件的存取.
     zip      zip包提供了zip档案文件的读写服务.
bufio      bufio 包实现了带缓存的I/O操作.
builtin      builtin 包为Go的预声明标识符提供了文档.
bytes      Package bytes implements functions for the manipulation of byte slices.
compress     
     bzip2      Package bzip2 implements bzip2 decompression.
     flate      Package flate implements the DEFLATE compressed data format, described in RFC 1951.
     gzip      Package gzip implements reading and writing of gzip format compressed files, as specified in RFC 1952.
     lzw      Package lzw implements the Lempel-Ziv-Welch compressed data format, described in T. A. Welch, ``A Technique for High-Performance Data Compression'', Computer, 17(6) (June 1984), pp 8-19.
     zlib      Package zlib implements reading and writing of zlib format compressed data, as specified in RFC 1950.
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.
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      Package 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      md5 包实现了在 RFC 1321 中定义的 MD5 哈希算法.
     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 SHA1 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 SHA384 and SHA512 hash algorithms as defined in FIPS 180-2.
     subtle      Package subtle implements functions that are often useful in cryptographic code but require careful thought to use correctly.
     tls      Package tls partially implements TLS 1.2, as specified in RFC 5246.
     x509      Package x509 parses X.509-encoded keys and certificates.
          pkix      Package pkix contains shared, low level structures used for ASN.1 parsing and serialization of X.509 certificates, CRL and OCSP.
database     
     sql      sql 包提供了通用的SQL(或类SQL)数据库接口.
          driver      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      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      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      ascii85 包是对 ascii85 的数据编码的实现.
     asn1      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      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      Package hex implements hexadecimal encoding and decoding.
     json      Package json implements encoding and decoding of JSON objects as defined in RFC 4627.
     pem      Package pem implements the PEM data encoding, which originated in Privacy Enhanced Mail.
     xml      Package xml implements a simple XML 1.0 parser that understands XML name spaces.
errors      error 包实现了用于错误处理的函数.
expvar      Package expvar provides a standardized interface to public variables, such as operation counters in servers.
flag      flag 包实现命令行标签解析.
fmt      fmt 包实现了格式化I/O函数,类似于C的 printf 和 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 the corresponding operations.
     doc      Package doc extracts source code documentation from a Go AST.
     format      Package format implements standard formatting of Go source.
     importer      Package importer provides access to export data importers.
     parser      Package parser implements a parser for Go source files.
     printer      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      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      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      color 包实现了基本的颜色库。
          palette      Package palette provides standard color palettes.
     draw      draw 包提供组装图片的方法.
     gif      gif 包实现了GIF图片的解码.
     jpeg      Package jpeg implements a JPEG image decoder and encoder.
     png      png 包实现了PNG图像的编码和解码.
index     
     suffixarray      Package suffixarray implements substring search in logarithmic time using an in-memory suffix array.
io      io 包为I/O原语提供了基础的接口.
     ioutil      ioutil 实现了一些I/O的工具函数。
log      Package log implements a simple logging package.
     syslog      Package syslog provides a simple interface to the system log service.
math      math 包提供了基本常数和数学函数。
     big      big 包实现了(大数的)高精度运算.
     cmplx      cmplx 包为复数提供了基本的常量和数学函数.
     rand      rand 包实现了伪随机数生成器.
mime      Package mime implements parts of the MIME spec.
     multipart      Package multipart implements MIME multipart parsing, as defined in RFC 2046.
     quotedprintable      Package quotedprintable implements quoted-printable encoding as specified by RFC 2045.
net      Package net provides a portable interface for network I/O, including TCP/IP, UDP, domain name resolution, and Unix domain sockets.
     http      Package http provides HTTP client and server implementations.
          cgi      cgi 包实现了RFC3875协议描述的CGI(公共网关接口).
          cookiejar      Package cookiejar implements an in-memory RFC 6265-compliant http.CookieJar.
          fcgi      fcgi 包实现了FastCGI协议.
          httptest      httptest 包提供HTTP测试的单元工具.
          httputil      Package httputil provides HTTP utility functions, complementing the more common ones in the net/http package.
          pprof      pprof 包通过提供HTTP服务返回runtime的统计数据,这个数据是以pprof可视化工具规定的返回格式返回的.
     mail      mail 包实现了解析邮件消息的功能.
     rpc      rpc 包提供了一个方法来通过网络或者其他的I/O连接进入对象的外部方法.
          jsonrpc      jsonrpc 包使用了rpc的包实现了一个JSON-RPC的客户端解码器和服务端的解码器.
     smtp      Package smtp implements the Simple Mail Transfer Protocol as defined in RFC 5321.
     textproto      Package textproto implements generic support for text-based request/response protocols in the style of HTTP, NNTP, and SMTP.
     url      Package url parses URLs and implements query escaping.
os      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.
reflect      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      TODO(osc): 需更新 runtime 包含与Go的运行时系统进行交互的操作,例如用于控制Go程的函数.
     cgo      cgo 包含有 cgo 工具生成的代码的运行时支持.
     debug      debug 包含有程序在运行时调试其自身的功能.
     pprof      pprof 包按照可视化工具 pprof 所要求的格式写出运行时分析数据.
     race      race 包实现了数据竞争检测逻辑.
sort      sort 包为切片及用户定义的集合的排序操作提供了原语.
strconv      Package strconv implements conversions to and from string representations of basic data types.
strings      Package strings implements simple functions to manipulate strings.
sync      sync 包提供了互斥锁这类的基本的同步原语.
     atomic      atomic 包提供了底层的原子性内存原语,这对于同步算法的实现很有用.
syscall      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      Package time provides functionality for measuring and displaying time.
unicode      unicode 包提供了一些测试Unicode码点属性的数据和函数.
     utf16      utf16 包实现了对UTF-16序列的编码和解码。
     utf8      utf8 包实现了支持UTF-8文本编码的函数和常量.
unsafe      unsafe 包含有关于Go程序类型安全的所有操作.

其它包

字代码库

这些包是 Go 项目的一部分,但并未在主源码树中。它们在比 Go 核心库更加宽松的兼容性需求下开发。 可通过“go get”安装它们.

社区

这些服务可帮你寻找社区提供的开源包。