https://devhubby.com/thread/how-to-get-the-last-element-of-a-slice-in-golang-1