How to escape back ticks
If your query is long, it might be worth putting in a text file and reading it in, that will keep your code more concise and organized, and also avoid the backtick quoting issue entirely.
You cannot escape backticks inside backticks, but you can do:
dbmap := db.InitDb()
var roles []entities.Role
query := `
SELECT *
FROM ` + "`Role`"
_, err := dbmap.Select(&roles, query, nil)
if err != nil {
panic(err)
}
fmt.Println(roles)