Language and tool enhancements for Go
og
: Language and tool enhancements for Gogo get github.com/lunixbochs/og
You can update og to the latest version with og update
.
og
is a go
frontend with additional features, such as a code preprocessor.
Use it as you would the existing go
command, like go build
or go run
.
It also provides the following extra commands:
og help
...
gen generate preprocessed source tree
parse preprocess one source file
update update og command
...
try()
: reduces the if err != nil {}
pattern to a single line.
// before
tmp, err := call()
if err != nil {
return nil, err
}
// after
tmp := try(call())