5
iamkrid
7y

Isn’t the usage of environment variables common for golang apps?

I interviewed for a company which made me develop a golang backend service and I used environment variables for sql connection strings and client and secret IDs and all.

When I submitted them the project, the feedback was that the tech person isn’t familiar with dotenv configuration.

Any inputs about any other way this could’ve gone?

Comments
  • 0
    I store all configs in dotenv file and its not commited instead a sample is.provided.

    The reason why we should not store credentials in a file, because its gets commited and you can know the database or other credentials using git history.
  • 0
    @zokazavevu exactly the reason I used dotenv file.

    But the interviewer may not have the idea about it. I was rejected because he couldn’t get the Project running. I gave the sample .env file as well.
  • 1
    The 'tech person' is a fucking eejit. Bullet dodged.
Add Comment