Golang in Windows: Execute command as another user

In Windows, there are some (admittedly limited) use cases where you could be interested in executing a command as another user. I came across one such use case during the development of Tutela, but this could be extended to generic uses. Under Windows, most services would need to run using SYSTEM credentials. This is true … Continue reading Golang in Windows: Execute command as another user

Golang Gotcha: Modifying an array of structs

Scenario Using Golang, we initialize an array of structs, within which we'd like to change a field by iterating over the initialized array. This would be necessary (for example) to initialize certain struct fields. An initial pass at the code may look something like this: // play with this code here: https://go.dev/play/p/VH0duYxZVZn package main import … Continue reading Golang Gotcha: Modifying an array of structs