Packages:
Packages
suggest changeA package in Go represents a unit of related code. Other languages often call them libraries.
A package consists of multiple files in a single directory. There's one-to-one mapping between a directory and a package.
You can have multiple packages in a single repository.
Go standard library is provided as a set of packages.
A package is identified by import path e.g. github.com/gomarkdown/markdown is an import path of a package that parses markdown format.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents
4
Strings
5
Pointers
6
Arrays
7
Slices
8
Maps
9
Structs
10
Interfaces
15
Functions
16
Methods
18
Defer
20
Concurrency
22
Mutex
23
Packages
27
Logging
30
JSON
31
XML
32
CSV
33
YAML
34
SQL
35
HTTP Client
36
HTTP Server
38
Reflection
39
Context
40
Package fmt
41
OS Signals
42
Testing
49
gob
50
Plugin
53
Console I/O
54
Cryptography
59
Contributors