A package is the unit of compilation - the entire package is compiled in a
step and it's also where unexported names are scoped to.
A module is the unit of versioning - it's a bunch of packages versioned and
distributed together.

On Mon, Apr 1, 2024 at 8:43 AM Nikhilesh Susarla <nikhilesh1...@gmail.com>
wrote:

> Packages are inside modules.
> Package is nothing but collection of go files under a folder of that
> package name
>
> But without modules also we can import packages.
>
> Can someone point out the exact and main difference between package vs
> modules in golang.
>
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/e2f07639-d2a2-4a72-bec5-8cbcb2927200n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/e2f07639-d2a2-4a72-bec5-8cbcb2927200n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAEkBMfG%3DFbXAr_-SC17F%3DZa-n8cYG8yEmNQDwWOo5hjmz4ua9A%40mail.gmail.com.

Reply via email to