Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lunixbochs/og
Language and tool enhancements for Go
https://github.com/lunixbochs/og
Last synced: 2 months ago
JSON representation
Language and tool enhancements for Go
- Host: GitHub
- URL: https://github.com/lunixbochs/og
- Owner: lunixbochs
- Created: 2014-10-10T04:58:09.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-13T01:04:33.000Z (about 10 years ago)
- Last Synced: 2024-10-10T12:24:13.464Z (2 months ago)
- Language: Go
- Homepage:
- Size: 420 KB
- Stars: 53
- Watchers: 5
- Forks: 4
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
`og`: Language and tool enhancements for Go
----Installation
----go get github.com/lunixbochs/og
You can update og to the latest version with `og update`.
Usage
----`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
...Features
----- Preprocessor
- Easily perform AST transformations on Go projects as they are built
- Safe: will never modify or overwrite your existing files
- Fast: adds almost no time to your project build
- Language Extensions
- `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())