Skip to content

Instantly share code, notes, and snippets.

@yzguy
Last active August 22, 2017 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yzguy/0f6ec0e9d17c0a450fa990b976c30905 to your computer and use it in GitHub Desktop.
Save yzguy/0f6ec0e9d17c0a450fa990b976c30905 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
"strings"
)
var mapping = map[string]string{
"a": "4",
"e": "3",
"o": "0",
"l": "1",
"i": "!",
"s": "$",
"t": "7",
}
func main() {
text := strings.Join(os.Args[1:], " ")
for k, v := range mapping {
text = strings.Replace(strings.ToLower(text), k, v, -1)
}
fmt.Println(text)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment