Jaime Casero
Jan 4, 2024

I see you are using Golang Init function to start db connection (dont like it much in general because of lack of error handling logic, and lack of testability with global vars) . I'm wondering what is the Golang approach to properly shutdown the DB connection, when Lambda environment decides to stop the Golang instance. Is there any lambda specific handling function you know?

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Jaime Casero
Jaime Casero

Written by Jaime Casero

Software Engineer with 20 years experience in the Telco sector. Currently working at 1nce.

Responses (1)

Write a response