Skip to content

0xisk/exploring-golang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exploring Golang

A repository focused on learning and practicing Golang

screenshot

Go (golang)

  1. Strong and statically typed
  2. Excellent community
  3. Key features
    • Simplicity
    • Fast compile times
    • Garbage collected
    • Built-in concurrency
    • Compile to standalone binaries

Variables

Agenda:

  • Variable declaration
  • Redeclaration and shadowing
  • Visibility
  • Naming conventions
  • Type conversions

Variable declaration:

  • var foo int
  • var foo int = 42
  • foo := 42

Cant redeclare variables, but can shadow them.

All variables must be used.

Visibility:

  • lower case first letter for package scope
  • upper case first letter to export
  • no private scope

Naming conventions:

  • Pascal or camelCase
    • Capitalize acronyms (HTTP, URL)
  • As short as reasonable
    • Longer names for longer lives

Type conversions:

  • DestinationType(variable)
  • Use (strconv) package for string

Primitives

Agenda:

  • Boolean type
  • Numeric types
    • Integers
    • Floating point
    • Complex numbers
  • Text types

Resources

About

A repository focused on learning and practicing Golang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages