Skip to content

lunixbochs/og

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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())
      

About

Language and tool enhancements for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages