Hacker News new | past | comments | ask | show | jobs | submit login

Go doesn't require a folder for each version. You can simply change go.mod to declare the module as github.com/nemothekid/foolib/v2 or whatever.

That's one of the points of confusion — first that the go.mod module declaration doesn't need to exactly match the module location, and secondly, following this, that using a folder instead is a fallback option.

Go is famous for favouring simplicity in its design, but this is a rare instance where it's not made things simple enough.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: