The _____ command is used to initialize a new module in a Go project.
- go init
- go create
- go new
- go mod init
In Go, the go mod init command is used to initialize a new module in a Go project. This command creates a go.mod file in the project's root directory, which will be used to track the module's dependencies. It's an essential step when starting a new Go project or when adding module support to an existing project.
Loading...
Related Quiz
- The _____ function is used to indicate that a test should be skipped.
- How would you design a versioning strategy for a RESTful API?
- What is the built-in interface for error handling in Go?
- You are tasked with improving the performance of a Go application. How would you use unit testing to identify and verify optimizations?
- What considerations would you take into account when designing the URI scheme of a RESTful API?