Skip to content

Instantly share code, notes, and snippets.

@StephaneTy-Pro
Created January 4, 2016 14:50
Show Gist options
  • Save StephaneTy-Pro/5a461145d836811e77e5 to your computer and use it in GitHub Desktop.
Save StephaneTy-Pro/5a461145d836811e77e5 to your computer and use it in GitHub Desktop.
// by using KingPin
sSep = app.Flag("separator", "Separator to use in csv file (in read and write) [default is ','].").Short('s').Default(",").String()
// Need to cast *sSep in rune for option Comma in "encoding/csv"
w.Comma = bytes.Runes([]byte(*sSep))[0] // fr => converti la chaine en tableau de bytes, pour apres la convertir en rune
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment