Skip to content

Comment on Show HN: link shortening API in Go

Comments

    import (
    	"./utils"
This is what's known as a relative import, and it's very bad. You want "github.com/johnnye/short/utils", or (better yet) put your base62 stuff in package main, since it's just one function.

Cheers, I knew it wasn't very "go like" at the time. Will go and tidy it up at the weekend.

go discourages relative imports? interesting. why? Are these files not packaged together?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.