package dsnet import ( "os" ) func Remove() { if len(os.Args) <= 2 { // TODO non-red ExitFail("Hostname argument required: dsnet remove ") } conf := MustLoadDsnetConfig() hostname := os.Args[2] conf.MustRemovePeer(hostname) conf.MustSave() ConfigureDevice(conf) }