Skip to content

Instantly share code, notes, and snippets.

@cipepser
Created December 29, 2016 07:54
Show Gist options
  • Save cipepser/916d6c7abb3721d8c4df8e285afc51b2 to your computer and use it in GitHub Desktop.
Save cipepser/916d6c7abb3721d8c4df8e285afc51b2 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"strconv"
)
func Template(x int, y string, z float64) string {
var s = strconv.Itoa(x) + "時の" + y + "は" + strconv.FormatFloat(z, 'f', -1, 64)
return s
}
func main() {
var x int = 12
var y string = "気温"
var z float64 = 22.4
fmt.Println(Template(x, y, z))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment