Tooltitude
What is it?
Tooltitude is a productivity Visual Studio Code extension for the Go (GoLang) programming language. It includes a set of code actions, inspections. In the future we plan to add more smart features. You could use two links below to either install it directly in VS Code (after opening in VS Code, you need to press the blue install button on the opened page), or go to the VS Code marketplace.
Feature Highlights
Implementations lens
See implementaions and implementing methods
References lens
Click to look into these references right away
See deprecated symbols
Gopls doesn't indicate whether a symbol is deprecated at the moment of writing
Detect shadowed symbols
Helps prevent confusing code and erros
Handle Errors
Manage error handling boilerplate
Features
Code Lenses
Implementers count for interfaces and interface methods
Reference counts for functions, method, structs, interfaces, struct fields, and interface methods
Run or debug main packages from a code lens
Inspections
Show variable shadows
Show deprecated symbol usages
Postfix Completions
.if for "if expr {}"
.ifn for "if !expr {}"
.ifnil for "if expr == nil {}"
.ifnnil for "if expr != nil {}"
.parens for "(expr)"
.func for "func(expr)" where func is print, println, panic, len, cap, close, new, delete, append or make
.for for "for expr {}"
.for_range for automatic filling of range variables
.switch for "switch expr {}"
.return for "return expr"
.defer for "defer expr"
.& for &expr
.! for !expr
.* for *expr
.<- for <-expr
.var for "var id = expr"
.const for "const id = expr"
.= for "id = expr"
.:= for "id := expr"
Code Actions
Handle error (with panic, return err, wrapped error)
Extract variable
Apply De Morgan Laws
Merge String Literals
Flip comma
Invert if conditions
Convert else { if { to else if {
Unwrap else code action (return in the if-true block)
Iterate over collection
Convert raw string <-> string literal
Convert separated decimal literal <-> non separated decimal literal (i.e. 1000000 <-> 1_000_000)
Add/remove octal prefix in octal literals (i.e. 0100 <-> 0o100)
Convert defer to "multiline" defer (via closure)
Add else to if
Add channel receive result to assignment
Remove redundant parenthesis
Convert interface {} to any
Convert assignment to unresovled variable to short var decl
Flip binary operation, i.e. a + b -> b + a and a > b to b < a
Convert x += a to x = x + a and back, as well as with other operations
Anonymous func single line to/from multiline func
Add var type
Rune literal to/from string literal
Var to/from short var declaration
Split field
Merge imports