From the course: Learning Go

Unlock this course with a free trial

Join today to access over 24,200 courses taught by industry experts.

Explore basic Go syntax

Explore basic Go syntax - Go Tutorial

From the course: Learning Go

Explore basic Go syntax

- [Instructor] Every programming language has certain basic syntax rules, and you need to know these rules to be effective with that language. Here are some critical syntax rules in Go. Go is case sensitive. So identifiers such as function, variable and type names, have to be spelled exactly the way you see them in the documentation. Most variables and package names are lower and mixed case, but methods, which are functions that belong to types and fields, which are variables that are members of types frequently have initial uppercase characters. That has a special meaning in Go. An initial uppercase character, means that that symbol is exported. And that's the equivalent of the keyword public in other languages like Java and C sharp, a lowercase initial character means that the field or method isn't exported and isn't available to the rest of the application, or you could say that it's private. Another important…

Contents