x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

commit 3ca6d912002035c57d9310c93ee9b9cfce30d8e7
parent fcd43598d63fd3ecef6564bd836746fea5847b8b
Author: Oliver Lowe <o@olowe.co>
Date:   Wed, 16 Jul 2025 19:23:16 +0700

hnatom: remove unnecessary strconv

Diffstat:
Msrc/hnatom/hnatom.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/hnatom/hnatom.go b/src/hnatom/hnatom.go @@ -1,5 +1,6 @@ -// Command hnatom writes to the standard output a RFC 4287 Atom feed +// Command hnatom generates a RFC 4287 Atom feed // of current top stories from the Hacker News front page. +// The feed is written to the standard output. // The flags are: // // -n count @@ -19,7 +20,6 @@ import ( "log" "net/http" "os" - "strconv" "time" "olowe.co/x/atom" @@ -41,7 +41,7 @@ type Item struct { } func Get(id int) (*Item, error) { - u := fmt.Sprintf("%s/item/%s.json", apiRoot, strconv.Itoa(id)) + u := fmt.Sprintf("%s/item/%d.json", apiRoot, id) resp, err := http.Get(u) if err != nil { return nil, err