Skip to content

Instantly share code, notes, and snippets.

@vadzappa
Created April 9, 2020 09:55
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 vadzappa/b3a9c1dd309136139f013fce21ae4f47 to your computer and use it in GitHub Desktop.
Save vadzappa/b3a9c1dd309136139f013fce21ae4f47 to your computer and use it in GitHub Desktop.
func logFieldName(prefixes []string) string {
filtered := make([]string, 0, len(prefixes))
for _, p := range prefixes {
if p != "" {
filtered = append(filtered, p)
}
}
return strings.Join(filtered, "_")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment