In Go, the _________ directory is used to define a package that is shared across multiple projects.

  • src
  • pkg
  • bin
  • lib
The correct option is "pkg". In Go, the pkg directory is used to store compiled package objects that can be reused across multiple projects. When you create a package, its compiled form is placed in the pkg directory, making it accessible to other projects when imported. This promotes code reusability and modularity in Go programming.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *