#golang build system with file watcher, live reload and output streams

Realize is the Go tool that is focused to speed up and improve developers workflow.

https://github.com/tockins/realize

Automate your work pipeline, integrate additional tools of third party, define custom cli commands and reload projects at each changed without stop to write code.

Features

  • Highly customizable
  • Setup step by step
  • Live reload
  • Support for multiple projects
  • Save logs on files
  • Web panel for a smart view
  • Build, install, run, test, fmt, generate, vet and much more
  • Watch custom paths and specific file extensions
  • Multiple watching methods (Polling, File watcher)
  • Docker support

Share This:

An elegant MIME/SMTP email library with support for attachments for #golang

A simple, easy to use email library for Go (golang).

  • Full attachment support (attach anything that implements io.Reader)
  • Send to multiple addresses at the same time, including BCC addresses.
  • Supports composing multi-part messages (HTML and plain text emails for older clients)
  • Write templates directly to the email body (implements io.Writer for convenience)
  • Production ready – several million emails sent in a production environment
  • Comprehensive unit tests

https://github.com/domodwyer/mailyak

Share This:

A Commander for modern #golang CLI interactions

Cobra is both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.

https://github.com/spf13/cobra

Cobra is a library providing a simple interface to create powerful modern CLI interfaces similar to git & go tools.

Cobra is also an application that will generate your application scaffolding to rapidly develop a Cobra-based application.

Cobra provides:

  • Easy subcommand-based CLIs: app serverapp fetch, etc.
  • Fully POSIX-compliant flags (including short & long versions)
  • Nested subcommands
  • Global, local and cascading flags
  • Easy generation of applications & commands with cobra init appname & cobra add cmdname
  • Intelligent suggestions (app srver… did you mean app server?)
  • Automatic help generation for commands and flags
  • Automatic detailed help for app help [command]
  • Automatic help flag recognition of -h--help, etc.
  • Automatically generated bash autocomplete for your application
  • Automatically generated man pages for your application
  • Command aliases so you can change things without breaking them
  • The flexibility to define your own help, usage, etc.
  • Optional tight integration with viper for 12-factor apps

Cobra has an exceptionally clean interface and simple design without needless constructors or initialization methods.

Applications built with Cobra commands are designed to be as user-friendly as possible. Flags can be placed before or after the command (as long as a confusing space isn’t provided). Both short and long flags can be used. A command need not even be fully typed. Help is automatically generated and available for the application or for a specific command using either the help command or the --help flag.

Share This:

A collection of tools and libraries for working with #golang code, including linters and static analysis

A collection of tools and libraries for working with Go code, including linters and static analysis:

https://github.com/dominikh/go-tools

Tool Description
gosimple Detects code that could be rewritten in a simpler way.
keyify Transforms an unkeyed struct literal into a keyed one.
rdeps Find all reverse dependencies of a set of packages
staticcheck Detects a myriad of bugs and inefficiencies in your code.
structlayout Displays the layout (field sizes and padding) of structs.
structlayout-optimize Reorders struct fields to minimize the amount of padding.
structlayout-pretty Formats the output of structlayout with ASCII art.
unused Reports unused identifiers (types, functions, …) in your code.
megacheck Run staticcheck, gosimple and unused in one go

Libraries

In addition to the aforementioned tools, this repository contains the libraries necessary to implement these tools.

Share This:

#golang work-stealing scheduler explained

Nice article about Go’s scheduler job to distribute runnable goroutines over multiple worker OS threads that runs on one or more processors.

https://rakyll.org/scheduler/

Share This:

Boutique is an immutable state store with subscriptions to field changes for #golang

https://github.com/johnsiilver/boutique

Boutique is an immutable state store with subscriptions to field changes for Golang.
It provides a state store for storing immutable data. This allows data retrieved from the store to be used without synchronization.
In addition, Boutique allows subscriptions to be registered for changes to a data field or any field changes. Data is versioned, so you can compare the version number between the data retrieved and the last data pulled.

 

Finally, Boutique supports middleware for any change that is being committed to the store. This allows for features like debugging, long term storage, authorization checks, … to be created.

Best use cases?

Boutique is useful for:

  • A web based application that stores state on the server and not in Javascript clients. I like to use it instead of Redux.
  • An application that has lots of clients, each which need to store state and receive updates.
  • An application that has listeners sharing a single state with updates pushed to all listeners.

Share This:

A scalable, performant, rapid development Web framework for #golang

aah framework makes it easy to build scalable web apps and mobile apps API with Go language. Framework goal is to achieve rapid, highly configurable, very small footprint and balanced Go web framework for small, medium, enterprise scale. Developer have to focus on application logic instead of building infrastructure, reinventing the wheel. aah values Don’t Repeat Yourself and Convention Over Configuration, it makes application development more fun, free and open source.

https://github.com/go-aah/aah

Share This:

A Distributed Cron-Style Job System in #golang

cronsun is a distributed golang based cron-style job system. It’s similar with crontab on stand-alone *nix.

https://github.com/shunfei/cronsun

Purpose

The goal of this project is to make it much easier to manage jobs on lots of machines and provides high availability. cronsun is different from Azkaban, Chronos, Airflow.

Features

  • Easy manage jobs on multiple machines
  • Managemant panel
  • Mail service
  • Multi-language support
  • Simple authentication and accounts manager(default administrator email and password: admin@admin.com/admin)

Share This:

A lightweight, distributed relational database built on SQLite with #golang

https://github.com/rqlite/rqlite

rqlite is a distributed relational database, which uses SQLite as its storage engine. rqlite uses Raft to achieve consensus across all the instances of the SQLite databases, ensuring that every change made to the system is made to a quorum of SQLite databases, or none at all. It also gracefully handles leader elections, and tolerates failures of machines, including the leader. rqlite is available for Linux, OSX, and Microsoft Windows.

Why?

rqlite gives you the functionality of a rock solid, fault-tolerant, replicated relational database, but with very easy installation, deployment, and operation. With it you’ve got a lightweight and reliable distributed relational data store. Think etcd or Consul, but with relational data modelling also available.

You could use rqlite as part of a larger system, as a central store for some critical relational data, without having to run a heavier solution like MySQL.

Key features

  • Very easy deployment, with no need to separately install SQLite.
  • Fully replicated production-grade SQL database.
  • Production-grade distributed consensus system.
  • An easy-to-use HTTP(S) API, including leader-redirection and bulk-update support. A CLI is also available.
  • Discovery Service support, allowing clusters to be dynamically created.
  • Extensive security and encryption support, including node-to-node encryption.
  • Choice of read consistency levels.
  • Transaction support.
  • Hot backups.

Share This:

#golang tool for static analysis, unit testing, code review and generate code quality report.

A Golang tool that does static analysis, unit testing, code review and generate code quality report. This is a tool that concurrently runs a whole bunch of those linters and normalizes their output to a report

https://github.com/wgliang/goreporter

Supported linters

  • unittest – Golang unit test status.
  • deadcode – Finds unused code.
  • gocyclo – Computes the cyclomatic complexity of functions.
  • varcheck – Find unused global variables and constants.
  • structcheck – Find unused struct fields.
  • aligncheck – Warn about un-optimally aligned structures.
  • errcheck – Check that error return values are used.
  • copycode(dupl) – Reports potentially duplicated code.
  • gosimple – Report simplifications in code.
  • staticcheck – Statically detect bugs, both obvious and subtle ones.
  • godepgraph – Godepgraph is a program for generating a dependency graph of Go packages.
  • misspell – Correct commonly misspelled English words… quickly.
  • countcode – Count lines and files of project.

 

Share This: