How do I achieve replacing of the practice of calling actual password in above code with a variable.
pwd := "password"
db, err := sql.Open("mysql", "root:pwd@/events")
if err != nil {
fmt.Printf("Error: Failed to connect events schema.
")
return
}
defer db.Close()