go-basics

command module
v0.0.0-...-20ee0bb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: MIT Imports: 7 Imported by: 0

README

Go basics

This repository has all-in-one main.go that demos basic data structures, syntax, style and features of go programming language 1.x

# if you want to run it (to make sure it all valid)
go run main.go

you can also try a version in Go playground

In case you want to see similar layout in other language (for side-by-side comparison):

Reasons

I switch between different languages often.

Main reason I have created this file is to serve as a quick refresher or cheat sheet for go.

Most high-level languages have similar features: variables, common data types, conditional statements, loops, functions.

Yes, there are a ton of cheat sheets in existence:

  • some are just lacking examples
  • others describe each piece on separate page (just to show ads)
  • some are way too long

This is format I believe represent top 95% things I use when writing go code.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL