Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Primitive Types & Constants | Go Programming Bootcamp lesson | BraveProgrammer
  1. Courses
  2. /
  3. Go Programming Bootcamp

Lesson 4 of 60

·Go

Primitive Types & Constants

15 minutes

Course progress7%

Primitive Types & Constants

Go has a small set of fundamental types, which makes the language easier to learn and reason about.

Primitive types

TypeDescription
booltrue/false
stringimmutable UTF-8 text
int, int8, , ,
int16
int32
int64
signed integers
uint, uint8, uint16, uint32, uint64unsigned integers
float32, float64floating-point numbers
bytealias for uint8
runealias for int32 (Unicode code point)

Go uses int and uint as the default integer types when specific size is not required.

Constants

Constants are values that cannot change after they are declared.

const Pi = 3.14159
const (
    Red   = iota
    Green
    Blue
)

iota is a tool for automatically incrementing constant values within a block.

Info

Untyped constants are flexible and can be used with different numeric types, but a typed constant is required when a specific type is expected.
Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from Go Programming BootcampBrowse activities
Previous lessonBasic Syntax: Packages, Functions, and VariablesContinue to lesson 5Control Flow: if, switch, for LoopsBack to Go Programming Bootcamp curriculum