跳到主要内容

Go Standard Library

Core Packages

fmt

  • Formatted I/O operations
  • String formatting
  • Print functions
  • Scanning functions

strings

  • String manipulation
  • String searching
  • String comparison
  • String building

reflect

  • Runtime reflection
  • Type information
  • Value manipulation
  • Method invocation

I/O Operations

io

  • Basic I/O interfaces
  • Reader and Writer
  • Seek and Close
  • Copy operations

os

  • File operations
  • Process management
  • Environment variables
  • System calls

bufio

  • Buffered I/O
  • Scanner interface
  • Text reading
  • Line reading

Network Programming

net

  • TCP/IP networking
  • UDP networking
  • Unix domain sockets
  • DNS resolution

net/http

  • HTTP client
  • HTTP server
  • Request handling
  • Middleware support

encoding/json

  • JSON marshaling
  • JSON unmarshaling
  • Stream processing
  • Custom encoders/decoders

Data Processing

encoding

  • Base64 encoding
  • Binary encoding
  • Hex encoding
  • CSV processing

crypto

  • Hash functions
  • Encryption
  • TLS/SSL
  • Digital signatures

compress

  • Gzip compression
  • Zip archives
  • LZ77 compression
  • Flate compression

Common Utilities

time

  • Time operations
  • Duration calculations
  • Timers and tickers
  • Time formatting

sync

  • Mutex types
  • WaitGroup
  • Once
  • Pool

context

  • Context management
  • Cancellation
  • Deadlines
  • Value passing