用户:查找需要cgo

After cross compiling and testing an app, I got this error:

user: Lookup requires cgo

If I am right currently there is no way to fix this rather than compiling directly on the target architecture.

Setting up multiple architectures is not a simple task, therefore wondering what could it be done as workaround to this.

For my use case, I need to verify if a user exists on the system in order to run a command on behalf that user, before calling commands like who, id are there any syscalls or go native methods that could allow me to get this information not depending on cgo?