Sugo offers handy syntactic sugar (though not technically a syntactic sugar) for
Go, designed to simplify your code and save you time. Whether you're dealing
with repetitive tasks or complex operations, sugo provides intuitive solutions
that enhance readability and efficiency in Go programming.
- par: Run multiple goroutines concurrently, possibly for parellelizing it.
Use
par.ForEach/par.Mapfor slices. - errors/must: If you prefer not to manually handle errors, you may use it.
Use
must.Of/must.Of2/must.Of3for any type. - ptr/ref: Convenient way to create a pointer to a literal value.
Use
ref.Offor any type. - ptr/deref: Convenient way to dereference a pointer with a default value
for a
nilpointer. Usederef.Of/deref.Orfor any type. - arg: ArgMin/ArgMax.
- ranger: To deal with integer indices safely. It's more useful with
par.
go get github.com/jaeyeom/sugoPlease take a look at examples in https://pkg.go.dev/github.com/jaeyeom/sugo
Backward compatibility is guaranteed for the same major version since v1.0.0.
We welcome contributions from everyone. If you have a suggestion that could
improve sugo, please open an issue and tag it with "enhancement" for
discussion. Don't forget to star the project! Thank you again!
Sugo is licensed under the MIT License - see the LICENSE file for details.