I am currently learning Go & it mentions using go.mod
for dependency management. When using node, package.json files are used for dependency management, so is go.mod
the same thing as something like npm init -y
?
yes. go mod init will create go.mod file. go mod tidy ( like npn install ) will pull the dependency in the go.mod file, go get will pull single dependency(like npn install...), see more detail on official site.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.