Language
日本語
English

Caution

JavaScript is disabled in your browser.
This site uses JavaScript for features such as search.
For the best experience, please enable JavaScript before browsing this site.

  1. Home
  2. Go Dictionary

Go Dictionary Index

[Setup] Go Development EnvironmentSteps to set up an environment for installing and running Go.
Variable Declaration / Short DeclarationWhen to use var versus := declarations.
Basic Data TypesIntegers, floating-point numbers, strings, and booleans.
Constants / iotaDefining constants and auto-generating sequential values.
Arrays / SlicesDifferences between fixed-length arrays and variable-length slices.
MapAn associative array managed as key-value pairs.
PointersA mechanism for directly manipulating memory addresses.
Type Conversion / Type AssertionConverting a value to a different type.
Zero ValuesThe initial value automatically set at declaration time.
if / elseBasics of conditional branching.
forThe only loop syntax in Go.
switchMulti-way branching and type switches.
deferA mechanism for deferring execution until a function ends.
goto / LabelsLabel jumps and loop labels.
Function Definition / Multiple Return ValuesBasics of Go functions and returning multiple values.
Variadic FunctionsA function that accepts a variable number of arguments.
Closures / Anonymous FunctionsTreating functions as values and capturing outer variables.
init() / main()Special functions for initialization and the execution entry point.
panic() / recover()Raising and recovering from runtime errors.
structA data structure that groups multiple fields together.
Methods / ReceiversDefining functions associated with a type.
interfaceA type that defines behavior.
Type Aliases / Custom TypesDefining a new type based on an existing type.
GenericsWriting generic code using type parameters.
error Type / errors PackageStandard error handling patterns in Go.
fmt.Errorf() / %wWrapping errors and chaining causes.
Custom Error TypesCreating custom errors by implementing the Error() method.
goroutineAchieving concurrent processing with lightweight threads.
channelA mechanism for passing data between goroutines.
selectWaiting on multiple channels simultaneously.
sync.WaitGroupA mechanism for waiting for goroutines to complete.
sync.Mutex / RWMutexExclusive access to shared resources.
fmt.Println() / Print() / Printf()Writing to standard output.
fmt.Sprintf() / Fprintf()String formatting and writing to a writer.
fmt.Scan() / Scanf() / Scanln()Reading from standard input.
Format VerbsA list of format verbs such as %v, %T, and %d.
strings.Contains() / HasPrefix() / HasSuffix()Searching and checking strings.
strings.Split() / Join() / Replace()Splitting, joining, and replacing strings.
strings.ToUpper() / ToLower() / TrimSpace()Converting case and trimming strings.
strconv.Atoi() / Itoa() / ParseFloat()Converting between strings and numbers.
os.Open() / Create() / Remove()Opening, creating, and deleting files.
os.ReadFile() / WriteFile()Reading and writing files all at once.
os.Args / os.Getenv()Getting command-line arguments and environment variables.
io.Reader / Writer / bufioI/O interfaces and buffering.
http.Get() / Post()Sending requests with an HTTP client.
http.ListenAndServe()Starting an HTTP server.
http.Request / ResponseWriterManipulating requests and responses.
http.ServeMuxURL routing mechanism.
json.Marshal() / Unmarshal()Converting between Go and JSON.
json.Encoder / DecoderReading and writing JSON as a stream.
JSON Tags / omitemptyJSON field names and options for struct fields.
time.Now() / Sleep() / Format()Getting the time, sleeping, and formatting.
math PackageBasic mathematical functions.
math/rand PackageGenerating random numbers.
sort PackageSorting slices.
regexp PackagePattern matching with regular expressions.
Packages / importDefining and importing packages.
Go ModulesDependency management tool.
go build / run / testCommonly used Go commands.