Infinite Loop

A blog about software engineering, software architecture, distributed systems, cloud computing, and technology leadership.

About

Hi, I'm Vinicius Serpa (or simply Mestre). I'm a staff-level software engineer, currently working as a Systems Architect at Nextpower Inc.

14 July 2026

Go keywords complete list

by Vinicius Serpa

Go has 25 keywords. They are part of the language’s syntax and cannot be used as names for variables, functions, types, packages, etc.

25 keywords complete list

break
case
chan
const
continue
default
defer
else
fallthrough
for
func
go
goto
if
import
interface
map
package
range
return
select
struct
switch
type
var

However, they are not reserved keywords. They are predeclared identifiers of the language. Therefore, they can technically be overridden in a local scope (although doing so is bad practice).

Valid example (but not recommended):

func main() {
	int := "text"
	println(int)
}

This compiles because int is not a keyword; it is a pre-declared identifier.

An easy way to memorize

Declarations

Composite Types

Control Flow

Concurrency

Comparison with other languages

One of Go’s design goals was to keep the language small and easy to learn.

If you are studying for interviews or certifications, it is worth memorizing these 10 in particular, as they appear in practically all Go code:

package
import
func
var
const
if
for
range
switch
return
tags: golang - programming-language