Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
golangbot_tutorial [2019/08/25 09:24] – [Types] rpjdaygolangbot_tutorial [2019/08/27 10:52] (current) – [Misc] rpjday
Line 4: Line 4:
  
 The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy. The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy.
 +
 ===== Misc ===== ===== Misc =====
  
 +  * "_" is the "blank identifier"
   * Concurrency   * Concurrency
   * Compiled   * Compiled
Line 13: Line 15:
   * Debuggers?   * Debuggers?
   * Code analyzers?   * Code analyzers?
 +  * Install Visual Studio (https://code.visualstudio.com/docs/setup/linux)
  
 ===== Introduction ===== ===== Introduction =====
Line 18: Line 21:
 ==== Introduction and Installation ==== ==== Introduction and Installation ====
  
 +Advantages of Go:
 +
 +  * Simple syntax(?)
 +  * Fast compilation
 +  * Static linking
 +  * Concurrency (goroutines and channels)
 +  * Garbage collection
 +  * Simple language specification
 +  * Tooling
 +    * ''/usr/bin/gofmt''  (golang-bin package)
 +    * ''/usr/bin/golint'' (golint package)
 +    * ''go help vet''
 +    * ''go help tool''
 +
 +Used as the basis for Docker and Kubernetes.
 +
 +Third-party tooling, IDEs, etc.
 ==== Hello World ==== ==== Hello World ====
  
Line 23: Line 43:
  
 ==== Variables ==== ==== Variables ====
- 
- 
  
 ==== Types ==== ==== Types ====
 +
 +  * Go is strict about explicit typing.
  
 ==== Constants ==== ==== Constants ====
  
-<code> +  * Value must be known at compile time 
-const i = 42 +  * Not sure what it means that "const" things have a "defaulttype until used 
-</code> +  * What does it mean that something is "untyped"?
- +
-  * 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: +
-<code> +
-const typedhello string = "Hello World" +
-</code>+
  
 ===== Functions and Packages ===== ===== Functions and Packages =====
  
 ==== Functions ==== ==== Functions ====
- 
-  * return type //follows// parameter list 
  
 ==== Packages ==== ==== Packages ====
Line 115: Line 127:
  
 ===== First Class Functions ===== ===== First Class Functions =====
 +
 +===== Reflection =====
 +
 +===== File Handling =====
 +
 +==== Reading files ====
 +
 +==== Writing files ====
  • golangbot_tutorial.1566725048.txt.gz
  • Last modified: 2019/08/25 09:24
  • by rpjday