commit a93f673a0156849636e1967ad40b3bda68b4125b from: Dustin Sallings date: Fri Oct 31 02:01:07 2014 UTC Use fmt instead of strconv for simple int stringing commit - 7afa1f6b496c637c2c90d723520f21ca54c91031 commit + a93f673a0156849636e1967ad40b3bda68b4125b blob - 98df29d1a1122c62df5185c13e7cffb6dcb8fb5d blob + b22c5d5d49b677f840fc80a7d07075afca31cbf8 --- examples/client/exampleclient.go +++ examples/client/exampleclient.go @@ -1,10 +1,10 @@ package main import ( - "fmt" "io" "log" "os" + "strconv" "strings" "github.com/dustin/go-nntp/client" @@ -43,17 +43,17 @@ func main() { maybefatal("grouping", err) log.Printf("Got %#v", g) - n, id, r, err := c.Head(fmt.Sprintf("%v", g.High-1)) + n, id, r, err := c.Head(strconv.FormatInt(g.High-1, 10)) maybefatal("getting head", err) log.Printf("msg %d has id %v and the following headers", n, id) io.Copy(os.Stdout, r) - n, id, r, err = c.Body(fmt.Sprintf("%v", n)) + n, id, r, err = c.Body(strconv.FormatInt(n, 10)) maybefatal("getting body", err) log.Printf("Body of message %v", id) io.Copy(os.Stdout, r) - n, id, r, err = c.Article(fmt.Sprintf("%v", n)) + n, id, r, err = c.Article(strconv.FormatInt(n, 10)) maybefatal("getting the whole thing", err) log.Printf("Full message %v", id) io.Copy(os.Stdout, r)