标准库
https://godoc.org/-/go
builtin 包
常量
true,false,iota
函数
len cap close(c chan Type) delete(map,key) make new panic recover
类型
int8 ~ int64 uint8(byte) ~ uint64 uint int uintptr float32 float64 rune bool error string
strings 包
函数
Contains Index Split Replace ToLower ToUpper Trim
类型
Reader Replacer
strconv 包
函数
Atoi Itoa FormatInt ParseInt
sort 包
对 slices 和自定义集合进行排序
函数
Sort
os 包
函数
Exit (code int)
Exit causes the current program to exit with the given status code. Conventionally, code zero indicates success, non-zero an error. The program terminates immediately; deferred functions are not run.
Mkdir Remove Rename Truncate
类型
File FileInfo PathError Process Signal
exec 包
类型
Cmd Error ExitError Mutex
sync 包
类型
Cond Locker Mutex RWMutex Pool WaitGroup
io 包
函数
Copy ReadFull WriteString
类型
ByteReader ByteScanner ByteWriter Closer PipedReader PipedWriter ReadWriter Reader Seeker Writer WriterTo WriterAt
io/util 包
函数
ReaderAll ReadDir ReadFile WriterFile TempDir TempFile
bufio 包
常量
MaxScanTokenSize = 64 * 1024
函数
ScanBytes ScanLines ScanWords
类型
Reader Writer ReadWriter Scanner
time 包
函数
After Sleep Tick
类型
Time Duration Location Month Weekday TickerTimer
path 包
函数
Base Clean Dir Join Match Split
database/sql 包
函数
Drivers Register
类型
ColumnType DB Result Rows Scanner Stmt
net 包
函数
LookupAddr LookupCNAME LookupHost LookupIP LookupPort
类型
Addr Buffers Conn Pipe Dialer Flags IP IPAddr IPConn DialIP ListenIP IPNet Listener Resolver TCPAddr TCPConn TCPListener UDPAddr UDPConn UnixAddr UnixConn UnixListener UnknownNetworkError
net/http 包
函数
Error Handle HandleFunc ListenAndServe NotFound Redirect ServeFile SetCookie
类型
Client Cookie Dir File FileSystem RedirectHandler HandlerFunc Header Pusher Request Response Server Transport
标准库常用包介绍