Port of setconf to Go. Work in progress.