Last active
August 22, 2017 07:00
-
-
Save yzguy/0f6ec0e9d17c0a450fa990b976c30905 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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