-
-
Notifications
You must be signed in to change notification settings - Fork 88
Language: Go
Josh Bleecher Snyder edited this page Aug 12, 2023
·
5 revisions
This page is about Go-related Cursorless tips and quirks. It will eventually be subsumed by a Go docs page.
For the most part, Go is like any other Cursorless-supported language, and the first port of call is the main Cursorless documentation.
Cursorless considers any composite literal that contains any indexed element to be a map. That includes maps (map[string]int{"a": 2}
, structs using field names (T{a: 2}
), and arrays and structs with numeric indices ([256]bool{58: true}
). It also includes {}
.
Similarly, Cursorless considers any composite literal that contains any non-indexed element to be a list. That includes slices and arrays ([]int{2}
and structs not using field names (T{2}
). It also includes {}
.
For more on the rationale, see: