/software

📦 My Go packages

Since Golang is a new language, I've found myself creating some packages that I've found consistently useful.

This is a list of Go libraries that I authored and that I actively maintain. All of them are on Github. Feel free to look them up and submit PRs.

peerdiscovery

Pure-go library for cross-platform thread-safe local peer discovery using UDP multicast. I needed to use peer discovery for croc and everything I tried had problems, so I made another one.

progressbar

A very simple thread-safe progress bar which should work on every OS without problems. I needed a progressbar for croc and everything I tried had problems, so I made another one.

pake

This is a PAKE library for generating a strong secret between parties over an insecure channel. This library will help you allow two parties to generate a mutual secret key by using a weak key that is known to both beforehand (e.g. via some other channel of communication). This is a simple API for an implementation of password-authenticated key exchange (PAKE). This protocol is derived from Dan Boneh and Victor Shoup’s cryptography book (pg 789, “PAKE2 protocol). I decided to create this library so I could use PAKE in my file-transfer utility, croc.

jsonstore

JSONStore is a Go-library for a simple thread-safe in-memory JSON key-store with persistent backend. It’s made for those times where you don’t need a RDBMS like MySQL, or a NoSQL like MongoDB - basically when you just need a simple keystore. A really simple keystore. JSONStore is used in those times you don’t need a distributed keystore like etcd, or a remote keystore Redis or a local keystore like Bolt. Its really for those times where you just need a JSON file.

documentsimilarity

Compute document similarity using simple methods. Use Jaccard similarity or cosine similarity to compare one to many documents.

sqlite3dump

This is a Golang port of Python’s sqlite3 .iterdump() command. This is written to use mattn/go-sqlite3. Both are supposed to be functionally equivalent to sqlite3 DATABASE .dump.

A very simple way to get links from web page. This library uses the domain of the webpage to correctly parse relative links.

googleit

Get the top links for a given search from Bing and DuckDuckGo.

golock

Initialize the lock and then obtain it. If you specify the timeout and interval, it will poll at the given interval for the specified time until it successfully gets a lock, otherwise throw an error. If you don’t specify the timeout, then it will throw an error immediately if it does not obtain the lock.

wifiscan

A platform-independent way to scan for WiFi networks. wifiscan works by calling the OS-specific Wifi scan utility and parsing the output. For Linux this is iwlist, for Windows it is netsh.exe and for OS X it is airport. Other systems are not supported at the moment (although, as long as they are Linux-based I believe you can install iwlist).

listfiles

List files, fast. There are three methods here, it seems one of them is much better on Windows and one is much better on Linux (no tests on OSX). Neither of the better methods if the std filepath.Walk (StdLib).

versionedtext

A simple library wrapping sergi/go-diff for creating versioned text.

October 3, 2018

⚰️ Github Graveyard 🐊 croc - secure and easy data transfer