Skip to content

Instantly share code, notes, and snippets.

@bookmebus
Created October 26, 2018 02:40
Show Gist options
  • Save bookmebus/a9112911b852b108216469b62bcdff52 to your computer and use it in GitHub Desktop.
Save bookmebus/a9112911b852b108216469b62bcdff52 to your computer and use it in GitHub Desktop.
String interpolation
// import format
import ( "fmt" )
date := fmt.Sprintf("%d-%d-%d", year, month, day)
time := fmt.Sprintf("%d:%d:%d", hour, minute, second)
datetime := fmt.Sprintf("%s,%s", date, time)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment