πΈοΈMiscellaneous
Line Comments
Syntax
// Comment hereWorking Example
package main
import "fmt" as fmt
fun main(): Unit {
fmt.println("Hello world!") // This is a comment
}package main
import fmt "fmt"
func main() {
fmt.Println("Hello world!")
}
Hello world!Array Literal
Syntax
Working Example
Slice Literal
Syntax
Working Example
Map Literal
Syntax
Working Example
Indexing
Syntax
Working Example
Slicing
Syntax:
Working Example
Tuples
Syntax
Working Example
Type Assertion
Syntax
Working Example
Type Conversion
Syntax
Working Example
Goroutines
Syntax
Working Example
Defer
Syntax
Working Example
Pointers & Dereferencing
Pointer Syntax
Dereferencing Syntax
Working Example
Sending and Receiving with Channels
Sending Syntax
Receiving Syntax
Working Example
Negated Expression
Syntax
Working Example
Last updated