func main() { for _, arg := range os.Args[1:] { t, err := strconv.ParseFloat(arg, 64) if err != nil { fmt.Fprintf(os.Stderr, "cf: %v\n", err) os.Exit(1) } f := tempconv.Farenhiet(t) c := tempconv.Celsius(t) fmt.Printf("%s = %s, %s = %s\n", f, tempconv.FToC(f), c, tempconv.CToF(c)) } }
func main() { fmt.Println(tempconv.CToF(tempconv.BoilingC)) fmt.Println(tempconv.FreezingC) fmt.Printf("In formatted %%g output : %g\n", tempconv.BoilingC) fmt.Printf("In formatted %%v output : %v\n", tempconv.BoilingC) }