We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

By choosing 'I Accept', you consent to our use of cookies and other tracking technologies.

We use cookies and other tracking technologies to improve your browsing experience on our site, analyze site traffic, and understand where our audience is coming from. To find out more, please read our privacy policy.

By choosing 'I Accept', you consent to our use of cookies and other tracking technologies. Less

We use cookies and other tracking technologies... More

Login or register
to apply for this job!

Login or register to start contributing with an article!

Login or register
to see more jobs from this company!

Login or register
to boost this post!

Show some love to the author of this blog by giving their post some rocket fuel 🚀.

Login or register to search for your ideal job!

Login or register to start working on this issue!

Engineers who find a new job through Golang Works average a 15% increase in salary 🚀

Blog hero image

10 tools written in Go that every developer needs to know

Gustavo Henrique 1 February, 2019 (3 min read)

I will show up to you 10 awesome tools that help me a lot in my jobs. Because they are written in Go, no complex setup is necessary, you just need to run the binary file version according to your operating system (Linux, MacOS or Windows).

1. Caddy

Caddy is a lightweight HTTP/2 web server with automatic HTTPS (via Let's Encrypt), easy configuration and high performance. It also can be used in desktop machines to serve static files in the current folder. I replaced Nginx for Caddy a few years and I am very happy with this choice. I like to use him as a proxy for web applications and in SPA containers (VueJS and ReactJS).

cd $HOME/Downloads
caddy browse

2. Ngrok

Ngrok allows you to public URLs for several purposes. The common usage is exposing a local web server for demoing applications, but developers are also using for building webhook integrations, testing chatbots and access SSH servers on machines that do not have a public IP address. Ngrok also has a web interface showing up data about the requests received.
It is easy to use, just run it sending both the protocol and port to be exposed as arguments:

ngrok http 3000

3. Ctop

Ctop is a Top-like interface for container metrics, providing a concise and condensed overview of real-time metrics for multiple containers.

ctop

# running in container
docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock quay.io/vektorlab/ctop:latest

4. GoTTY

GoTTY is a simple command line tool that turns your CLI tools into web applications.
It has a good fit in scenarios where the Linux or MacOS machine does not have a SSH server installed and the normal user would like to give a remote access.

gotty -w bash  # the default port is 8080

5. Mattermost Server

Mattermost is a secure messaging workplace deployable to cloud or on–premises infrastructure under IT control. The open source server provides a web client but you can download both desktop and mobile clients on the product website.
When your company or friends starting to talk about Slack vs Discord vs Rocket Chat, you can talk about Mattermost to prolong (or not) the discussion time. :D

docker run -d -p 8065:8065 mattermost/mattermost-preview

6. Minio

Minio is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. It is similar to Amazon S3 and Google Cloud Storage.
I never used it but I think it is an interesting project.

export MINIO_ACCESS_KEY="AKIAIOSFODNN7EXAMPLE"
export MINIO_SECRET_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
./minio server $HOME

# running in container
docker run -p 9000:9000 -v $HOME:/data -e "MINIO_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE" -e "MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" minio/minio server /data

7. Piknik

Piknik seamlessly and securely transfers URLs, code snippets, documents, virtually anything between arbitrary hosts. No SSH needed, and hosts can sit behind NAT gateways, on different networks. It has a plugin for VS Code editor useful for teams sharing code snippets in a short moment. I have been using a lot to share contents between my Mac and my Linux workstation in the same wireless network.
The usage is:

# To fill the "clipboard"
piknik -copy < /home/gustavo/Downloads/picture.jpg

# Magically retrieve that content from any other host
piknik -paste > /Users/gustavo/Downloads/picture.jpg

8. Pgweb

Pgweb is lightweight and fast web-based PostgreSQL database browser.

pgweb --listen 8899 --url postgres://admin:password@127.0.0.1:5432/mydb?sslmode=disable

9. pRest

pREST is a way to serve a RESTful API from any databases.

PREST_HTTP_PORT=9191 \
PREST_PG_HOST=127.0.0.1 \
PREST_PG_USER=admin \
PREST_PG_PASS=password \
PREST_PG_DATABASE=mydb \
PREST_PG_PORT=5432 \
PREST_JWT_DEFAULT=false \
PREST_DEBUG=true \
prest

Running a SELECT * FROM table:

curl http://localhost:9191/database/schema/table

10. Terraform

Terraform is an open-source infrastructure as code tool, popular in DevOps stack. It enables users to define and provision a datacenter infrastructure using a high-level configuration language known as Hashicorp Configuration Language, or optionally JSON. It works with AWS, Google Cloud, Digital Ocean, etc.

cat > example.tf <<EOF
provider "aws" {
  access_key = "ACCESS_KEY_HERE"
  secret_key = "SECRET_KEY_HERE"
  region     = "us-east-1"
}

resource "aws_instance" "example" {
  ami           = "ami-2757f631"
  instance_type = "t2.micro"
}
EOF
terraform init
terraform apply

Links

The original post can be found in https://gustavohenrique.net/en/2019/01/10-tools-written-in-go-that-every-dev-needs-to-know.

  • https://caddyserver.com
  • https://ngrok.com
  • https://ctop.sh
  • https://github.com/yudai/gotty
  • https://mattermost.com
  • https://minio.io
  • https://github.com/jedisct1/piknik
  • https://sosedoff.github.io/pgweb
  • https://postgres.rest
  • https://www.terraform.io32933481_l.jpg

Originally published on gustavohenrique.net