Fix file management in rdp.Connect()
danhale-git opened this issue · 2 comments
danhale-git commented
Currently this function runs the file, defers os.Remove() and waits one second. This is probably buggy, find a better way to ensure the file is removed while letting the RDP application read it.
danhale-git commented
Also, use https://golang.org/pkg/text/template/ to format the file contents.
danhale-git commented
Before any of this is done, consider whether the file is even necessary. If #38 gets implemented then why not use command line (https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/mstsc) for windows and remove the need for a .rdp file.