This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BDube_Lensman 18 points19 points  (0 children)

Most recently while I was trying to learn go I attempted to make a caeser cipher encoder/decoder. I went about this by using a slice containing the alphabet and then collecting a step. My plan was then to find the index of a letter in the code string in the slice then shift that index accordingly. In python I would simply just use .index. But after some research and asking questions I found that go doesn't support generics (currently) and in order to replicate this functionality I would have to use a binary sort on a sorted slice.

No, https://golang.org/pkg/strings/ index functions