Skip to content

Instantly share code, notes, and snippets.

@arxdsilva
Last active August 16, 2017 13:54
Show Gist options
  • Save arxdsilva/4ccf70d2b5358c1d2fb513e172117c41 to your computer and use it in GitHub Desktop.
Save arxdsilva/4ccf70d2b5358c1d2fb513e172117c41 to your computer and use it in GitHub Desktop.
comparer with maps
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