Is `go get <module>` required to import Hugo modules?

From my interpretation of the docs, the requirements to add a Hugo submodule, in my case video-js, are:

  1. Make my project a Go module with hugo mod init github.com/user/project
  2. Add the following to my config:
module:
  imports:
  - path: github.com/hugomods/video-js

In reality I had to run go get github.com/hugomods/video-js@latest for Hugo to import a video-js submodule. Is this the correct workflow?

If so, I cannot find a suggestion to do this in the linked documentation. It implies that Hugo knows what to import if I specify the submodule path. I only got a hint to do otherwise so this external site that another confused user linked to in a forum thread. Note I, and the aforementioned confused user, am new to Go and may not have the intuition of other more experienced devs. I will happily make a pull request for more explicit documentation if go get... is required.

The answer is, “No.”

In trying to duplicate this error in a minimal case, I think I spotted my mistake. I was prompted to run hugo mod tidy which thus imported the submodule I wanted.

$ hugo mod init hugo-mvp
go: creating new go.mod: module hugo-mvp
hugo: to add module requirements and sums:
	hugo mod tidy
$ hugo mod tidy
go: no module dependencies to download
go: added github.com/hugomods/video-js v0.3.0
hugo: collected modules in 539 ms

I recall running this when originally trouble, but not sure why I got errors.
Regardless, to put everything in one place, a reasonable sequence would be:

  1. Run hugo mod init my-project-name
  2. Add external submodule path to config module imports
  3. run hugo mod tiny

The 2 first steps are enough. Hugo is automatically getting dependencies when you run e.g. hugo.

Starting to think I just misconfigured my original config file as the first two steps are the only required in a fresh repo. Thank you, both for the clarification.