Skip to content

Instantly share code, notes, and snippets.

@kasvith
Created July 26, 2019 15:46
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 kasvith/1c1c39d339d817197971c293c7ee57e1 to your computer and use it in GitHub Desktop.
Save kasvith/1c1c39d339d817197971c293c7ee57e1 to your computer and use it in GitHub Desktop.
func FormatByteSlice(sl []byte) string {
builder := strings.Builder{}
for _, v := range sl {
builder.WriteString(fmt.Sprintf("%d,", int(v)))
}
return builder.String()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment