This is an old revision of the document!


Notes on Golangbot Golang tutorial series.

The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy.

  • Concurrency
  • Compiled
  • Static linking
  • Linux based IDEs?
  • Debuggers?
  • Code analyzers?

Go does not allow automatic type promotion or conversion – “type conversion.”

bool (&&, ||)
string

int8  int16  int32  int64
int (32 or 64 depending)

uint8 uint16 uint32 uint64
uint (32 or 64 depending)

uintptr

float32 float64
complex64 complex128

byte // alias for uint8
rune // alias for int32

%T printf format specifier prints the type of something.

const i = 42
  • Value assigned to const must be known at compile time; cannot require any function execution.
  • Untyped constants have a default type associated with them and they supply it if and only if a line of code demands it. You can always created a typed constant if you want:
const typedhello string = "Hello World"
  • return type follows parameter list
  • golangbot_tutorial.1566725037.txt.gz
  • Last modified: 2019/08/25 09:23
  • by rpjday