libfaketime doesn't work with golang

Viewed 981

I would like my go program, which runs on ubuntu server (14.04), daemonized with supervisor, to use a fake server time.

In my supervisor config, I use this as the executing command:

"faketime 'last Friday 5 pm' /home/user/main"

The program runs, but displays the current time.

According to this article: Changing what time a process thinks it is with libfaketime

libfaketime cannot be used with statically linked or setuid programs, because LD_PRELOAD is not available to such programs.

Is there anyway to have my compiled go program use the faketime?

1 Answers
Related