This repository includes various tools and extensions that seemed to be missing in the standard go library and well known open source projects.
Dependencies are managed with dep
.
pkg/extensions
collections
- extensions for operations on collectionsnet
- utilities to convert and operate on structures returned by the standard go'snet
packageos
- improvements to go'sos
package, currently mostly about loading env vars with defaultsstrings
- to operate on slices of stringstime
- arefresher
utility to periodically execute a callback function
pkg/linux/command
- execute linux commands and capture full output info: stdOut, stdErr and exitCodenettools
- various utilities that wrap basic Linux network configuration commands, includingconntrack
- currently only supports removing entries from conntrackinterfaces
- allows for abstract implementation ofnet
package interface infoiproute
- management ofip route
route table entries andip rule
routing rulesipset
- management ofipset
: sets and set entriesiptables
- management ofiptables
rules based on unique rule comments
- Install dep
- Clone this repository to
$GOPATH/src/github.com/DevFactory/go-tools
- Install dependencies with
dep
:dep ensure -v --vendor-only
- Everything ready, you can run unit tests:
go test -cover ./pkg/...