igo alternatives and similar packages
Based on the "Go Tools" category.
Alternatively, view igo alternatives based on common mentions on social networks and blogs.
-
JuiceFS
JuiceFS is a distributed POSIX file system built on top of Redis and S3. -
JSON-to-Go
Translates JSON into a Go type in your browser instantly (original) -
The Go Play Space
Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more -
Peanut
🐺 Deploy Databases and Services Easily for Development and Testing Pipelines. -
golang-tutorials
Golang Tutorials. Learn Golang from Scratch with simple examples. -
xdg-go
Go implementation of the XDG Base Directory Specification and XDG user directories -
typex
[TOOL, CLI] - Filter and examine Go type structures, interfaces and their transitive dependencies and relationships. Export structural types as TypeScript value object or bare type representations. -
golang-ipc
Golang Inter-process communication library for Window, Mac and Linux. -
gothanks
GoThanks automatically stars Go's official repository and your go.mod github dependencies, providing a simple way to say thanks to the maintainers of the modules you use and the contributors of Go itself. -
Viney's go-cache
A flexible multi-layer Go caching library to deal with in-memory and shared cache by adopting Cache-Aside pattern. -
go-lock
go-lock is a lock library implementing read-write mutex and read-write trylock without starvation -
goroutines
It is an efficient, flexible, and lightweight goroutine pool. It provides an easy way to deal with concurrent tasks with limited resource. -
PDF to Image Converter Using Golang
This project will help you to convert PDF file to IMAGE using golang. -
An exit strategy for go routines.
An exit strategy for go routines -
import "github/shuLhan/share"
A collection of libraries and tools written in Go; including DNS, email, git ini file format, HTTP, memfs (embedding file into Go), paseto, SMTP, TOTP, WebSocket, XMLRPC, and many more. -
go-james
James is your butler and helps you to create, build, debug, test and run your Go projects -
generator-go-lang
A Yeoman generator to get new Go projects started. -
go-sanitize
:bathtub: Golang library of simple to use sanitation functions -
docs
Automatically generate RESTful API documentation for GO projects - aligned with Open API Specification standard -
gomodrun
The forgotten go tool that executes and caches binaries included in go.mod files. -
channelize
A websocket framework to manage outbound streams. Allowing to have multiple channels per connection that includes public and private channels. -
Proofable
General purpose proving framework for certifying digital assets to public blockchains -
go-whatsonchain
:link: Unofficial golang implementation for the WhatsOnChain API -
redispubsub
Redis Streams queue driver for https://godoc.org/gocloud.dev/pubsub package -
go-slices
Helper functions for the manipulation of slices of all types in Go -
MessageBus implementation for CQRS projects
CQRS Implementation for Golang language -
modver
Compare two versions of a Go module to check the version-number change required (major, minor, or patchlevel), according to semver rules.
Updating dependencies is time-consuming.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of igo or a related project?
README
Improved Go (igo) 
Everyone knows that Go is a very verbose language. It takes numerous lines of code to do what a few lines of code can do in other languages. This is a deliberate design decision by the Go Authors.
The igo project provides various syntactical sugar to make your code simpler and easier to read. It works by allowing you to program in *.igo
files with the fancy new syntax. You then run igo build
to transpile your igo
files to standard go
files which you can then build as per normal.
- Address Operator (&)
- Constants and Functions
- Defers for for-loops
fordefer
guarantees to run prior to the loop's current iteration exiting.
- Defer go
- Run defer statements in a goroutine
- must function
- Converts a multi-return value function into a single-return function.
- See #32219
- Negative slice indices
NOTE: igo is pronounced ee-gohr
⭐ the project to show your appreciation.
What is included
- igofmt (auto format code)
- igo transpiler (generate standard go code)
Installation
Transpiler
go get -u github.com/rocketlaunchr/igo
Use go install
to install the executable.
Formatter
go get -u github.com/rocketlaunchr/igo/igofmt
Inspiration
Most professional front-end developers are fed up with standard JavaScript. They program using Typescript and then transpile the code to standard ES5 JavaScript. igo adds the same step to the build process.
Examples
Address Operator
The Address Operator allows you to use more visually pleasing syntax. There is no need for a temporary variable. It can be used with string
, bool
, int
, float64
and function calls where the function returns 1 return value.
func main() {
message := &"igo is so convenient"
display(message)
display(&`inline string`)
display(&defaultMessage())
}
func display(m *string) {
if m == nil {
fmt.Print("no message")
} else {
fmt.Print(*m)
}
}
func defaultMessage() string {
return "default message"
}
Fordefer
See Blog post on why this is an improvement. It can be especially helpful in unit tests.
for {
row, err := db.Query("SELECT ...")
if err != nil {
panic(err)
}
fordefer row.Close()
}
Defer go
This feature makes Go's language syntax more internally consistent. There is no reason why defer
and go
should not work together.
mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
start := time.Now()
// Transmit how long the request took to serve without delaying response to client.
defer go transmitRequestStats(start)
fmt.Fprintf(w, "Welcome to the home page!")
})
Must builtin function
must
is a "builtin" function that converts a multi-return value function ("fn"
) into a single-return value function. fn's
final return value is expected to be of type error
. must
will panic upon fn
returning an error.
It is useful in scenarios where you know that no error will actually be returned by fn
and you just want to use the function inline. Alternatively, you may want to catch the error during local development because no error should be produced in production.
must
also accepts an optional second argument of type func(error) error
.
See #32219
import "database/sql"
db := must(sql.Open("mysql", "host"))
LIMITATIONS
- Currently, it only works when
fn
returns two return values. - It doesn't work when used outside of functions (i.e. initializing package variables).
- It works perfectly in simple cases. For more complex cases, peruse the generated code.
- A PR would be appreciated by an expert in the
go/types
package. It is possible to create a truly generics-compatiblemust
that resolves the limitations above. - Unlike real "builtin" functions,
must
is a reserved keyword.
Negative slice indices
You can use negative indices to refer to items in a slice starting from the back. It only works with constants and not variables.
x := []int{0, 1, 2, 3, 4}
x[-3] // x[len(x)-3]
x[-3:-1] // x[len(x)-3:len(x)-1]
How to use
Transpile
igo
can accept numerous directories or igo files. The generated go files are saved alongside the igo files.
igo build [igo files...]
Format Code
igofmt
will format your code to the standard form. It understands igo syntax.
igofmt [-s] [igo files...]
Configure your IDE to run igofmt
upon saving a *.igo
file.
-s
will attempt to simplify the code by running gofmt -s
.
Design Decisions and Limitations
Pull-Requests are requested for the below deficiencies.
- For
fordefer
:goto
statements inside a for-loop that jump outside the for-loop is not implemented. Usegithub.com/rocketlaunchr/igo/stack
package manually in such cases. -
goimports
equivalent has not been made. - Address Operator for constants currently only supports
string
,bool
,float64
andint
. The other int types are not supported. This can be fixed by using go/types package. - Address Operator feature assumes you have not attempted to redefine
true
andfalse
to something/anything else.
Tips & Advice
- Store the
igo
and generatedgo
files in your git repository. - Configure your IDE to run
igofmt
upon saving a*.igo
file.
Legal Information
The license is a modified MIT license. Refer to the LICENSE
file for more details.
© 2018-20 PJ Engineering and Business Solutions Pty. Ltd.
Final Notes
Feel free to enhance features by issuing pull-requests.
*Note that all licence references and agreements mentioned in the igo README section above
are relevant to that project's source code only.