internal/commonmodels: malformed module path "internal/commonmodels": missing dot in first path element

Viewed 36

I am using go version 1.19. My directory structure is as follows:

bdmodules
  --awsutils
    --go.mod //content of the go.mod is
       replace bdmodules/commonapiutils => ../../bdmodules/commonapiutils
  --commonapiutils
    --go.mod  //content of the go.mod is
      replace bdmodules/commonmodels => ../../bdmodules/commonmodels
  --commonmodels
    --go.mod //content of the go.mod has entries for external packages
  --gcputils
    --go.mod //content of the go.mod is
       replace bdmodules/commonapiutils => ../../bdmodules/commonapiutils

Now, when I run "go mod tidy" on gcputils, commonmodels, commonapiutils there are no errors. But, when I run "go mod tidy" on awsutils it gives me an error:

  bdmodules/awsutils imports
        bdmodules/commonapiutils imports
        bdmodules/commonmodels: malformed module path "bdmodules/commonmodels": missing dot in first path element
0 Answers
Related