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.
Loading...
Related Quiz
- How does Go's type system enhance code safety and maintainability?
- To achieve meaningful code coverage results, it's essential to have a _______ test suite.
- What are the key principles of RESTful design?
- In MongoDB, what does BSON stand for?
- What is meant by the term “performance optimization” in the context of Go programming?