HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to GoVariablesData TypesOperatorsStringsArray & SliceMap (Dictionary)Conditions (if / switch)Loops (for)Functions
REFERENCE
📖 Overview
🖥️ Output
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Array & Slice
🗂️ Map
🔁 Condition & Loop
🧩 Function
Go›REFERENCE

Go — Command Reference

Go's most used commands — fast, simple, and powerful. Each example is a complete program (starts with package main). Each includes an explanation and a working example.

8 categories · 23 commands

🖥️

Output

Printing to the screen and formatting.

fmt.Println()fmt.Printf()fmt.Sprintf()
3 commands →
📦

Variables

Variable definitions and constants.

:= (short declaration)varconst
3 commands →
🔢

Numbers & Math

Arithmetic and the math package.

Arithmetic ( + - * / % )math.Sqrt / Pow / Max
2 commands →
✍️

String

Methods from the len and strings packages.

len()strings.ToUpper / ToLowerstrings.Contains / ReplaceAllstrings.Split / Join
4 commands →
📋

Array & Slice

Working with flexible lists (slices).

slice [ ]append()
2 commands →
🗂️

Map

Key-value mappings.

map[K]VCheck if key exists (comma-ok)
2 commands →
🔁

Condition & Loop

Decision making and the only loop: for.

if / elseswitchfor (three forms)for ... range
4 commands →
🧩

Function

Function definition, multiple returns, and variadic functions.

funcMultiple returnVariadic (...)
3 commands →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code