GitLab has a feature called subgroups (explained here). When selecting GitLab as the Git provider for a Go remote repository, a checkbox appears called Resolve Subgroups (for configuration instructions, click here). When selected, Artifactory will determine sub-groups and sub-modules from URL paths and resolve any dependencies. If not selected, Artifactory will resolve Go modules by treating the /name/ as a submodule. By default, this checkbox is not selected.
The option to resolve subgroups was added to the Go remote repository configuration because GitLab implemented a change in the API path that is not part of the .git protocol. Artifactory can identify if the path is in fact a sub-group or a sub-module and resolve the correct dependency version.
Best Practices
Go remote repositories only work via a virtual repository. Therefore, a dedicated remote repository should be defined to the specific subgroup URL. You can decide on the remote resolution order, either go to a regular repository first and then a subgroup, or the other way around by ordering the list of remote repositories in the virtual repository.