Go Cheatsheets

[BASIC]

[GO]

Call to built-in function

Finds calls to the built-in `len` function.

[BASIC]

[GO]

Call to library function

Finds calls to "fmt.Println."

[BASIC]

[GO]

Call to method

Finds calls to the `Get` method of type `Header` from the `net/http` package.

[BASIC]

[GO]

Comparison with nil

Finds comparisons with nil.

[BASIC]

[GO]

Comparison with zero

Finds comparisons between an unsigned value and zero.

[BASIC]

[GO]

Compile-time constant

Finds compile-time constants with value zero.

[BASIC]

[GO]

Field read

Finds code that reads `Request.Method`.

[BASIC]

[GO]

Field write

Finds assignments to field `Status` of type `Response` from package `net/http`.

[BASIC]

[GO]

Find-references links

Generates use-definition pairs that provide the data for find-references in the code viewer.

[BASIC]

[GO]

Function

Finds functions called 'main'.

[BASIC]

[GO]

If statements with empty then branch

Finds 'if' statements where the 'then' branch is an empty block statement

[BASIC]

[GO]

Increment statements in loops

Finds increment statements that are nested in a loop

[BASIC]

[GO]

Jump-to-definition links

Generates use-definition pairs that provide the data for jump-to-definition in the code viewer.

[BASIC]

[GO]

Pointer Type

Finds pointer type `*Request` from package `net/http`.

[BASIC]

[GO]

Parameter

Finds parameters of type "ResponseWriter" from package "net/http".

[BASIC]

[GO]

Print AST

Outputs a representation of a file's Abstract Syntax Tree. This query is used by the VS Code extension.

[BASIC]

[GO]

Receiver variable

Finds receiver variables of pointer type.

[BASIC]

[GO]

Result variable

Finds result variables of type "error".

[BASIC]

[GO]

Type information

Finds code elements of type `*Request` from package `net/http`.

[BASIC]

[GO]

Type

Finds type `Request` from package `net/http`.

[BASIC]

[GO]

Variable read

Finds code that reads a variable called `err`.

[BASIC]

[GO]

Variable write

Finds assignments to variables named "err".

[BASIC]

[GO]

Variable

Finds variables called "err".