This is a simple Golang package for reading, manipulating and writing the /etc/network/interface file in most Debian based distributions.
This package is heavily based on the Python library Debinterface github.com/dggreenbaum/debinterface.
go get github.com/xtmono/netif
package main
import (
"github.com/xtmono/netif"
)