Last active
August 16, 2017 13:54
-
-
Save arxdsilva/4ccf70d2b5358c1d2fb513e172117c41 to your computer and use it in GitHub Desktop.
comparer with maps
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
func compare(original, translation map[string]string) map[string]string { | |
missing := make(map[string]string) | |
for k, v := range original { | |
if _, ok := translation[k]; !ok { | |
missing[k] = v | |
} | |
} | |
return missing | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment