1. Golang-Set

Go has arrays, slices and maps, but it doesn't have a set data structure. You can mimic a set with a map of bools, but it's nice to have an actual data type with the right operations and semantics.

golang-set This is wherecomes in.

2. Color

Let's continue with the color theme. When writing command-line programs, it is useful to use colors to highlight important messages or distinguish between errors, successes, and warnings.

color Thepackage gives an easy way to add some color to your programs (see what I did there?). It uses ANSII escape codes and supports Windows too!

3. Gen

gen Thetool generates code for you—in particular, type-aware code that tries to alleviate the gap of not having templates or generics in Go.

You annotate your types with a special comment, and gen generates source files that you include in your project. No runtime magic.

4. Gorm

Gorm Go is known for its spartan nature. Database programming is no different. Most popular DB libraries for Go are pretty low-level.brings the world of object-relational mapping to Go with the following features:

Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism)

Callbacks (Before/After Create/Save/Update/Delete/Find)

Preloading (eager loading)

Transactions

Composite Primary Key

SQL Builder

Auto Migrations

Logger

Extendable, write Plugins based on GORM callbacks

But it doesn't cover everything.

If you come from Python, don't expect SQLAlchemy magic.

For more fancy stuff, you'll have to go a lower level.

5. Goose

One of the most important tasks when working with relational databases is managing the schema.

goose goose up and goose down to go back and forth. Mind your data, though, and make sure it doesn't get lost or corrupted. Modifying the DB schema is considered a "scary" change in some organizations. Thepackage lets you perform schema changes and even data migrations if needed. You canandto go back and forth. Mind your data, though, and make sure it doesn't get lost or corrupted.

Goose works by versioning your schema and using migration files corresponding to each schema. The migration files can be SQL commands or Go commands. Here is an example of a SQL migration file that adds a new table:

6. Ginkgo

Ginkgo is a BDD (Behavior Driven Development) testing framework. It lets you write your tests in a syntax that resembles English and allow less technical people to review tests (and their output) and verify that they match the business requirements.

Gomega Some developers like this style of test specification too. It integrates with Go's built-in testing package and is often combined with

7. Etcd

Etcd gRPC is a reliable distributed Key-Value store. The server is implemented in Go, and the Go client interacts with it though

It focuses on the following:

Simple: well-defined, user-facing API (gRPC).

Secure: automatic TLS with optional client cert authentication.

Fast: benchmarked 10,000 writes/sec.

Reliable: properly distributed using Raft.

8. NSQ

NSQ is a great distributed queue. I've used it successfully as a primary building block for large-scale distributed systems. Here are some of its features:

Support distributed topologies with no SPOF.

Horizontally scalable (no brokers, seamlessly add more nodes to the cluster).

Low-latency push based message delivery (performance).

Combination load-balanced and multicast style message routing.

Excel at both streaming (high-throughput) and job oriented (low-throughput) workloads.

Primarily in-memory (beyond a high-water mark messages are transparently kept on disk).

Runtime discovery service for consumers to find producers (nsqlookupd).

Transport layer security (TLS).

Data format agnostic.

Few dependencies (easy to deploy) and a sane, bounded, default configuration.

Simple TCP protocol supporting client libraries in any language.

HTTP interface for stats, admin actions, and producers (no client library needed to publish).

Integrates with statsd for real-time instrumentation.

Robust cluster administration interface (nsqadmin).