2

Hi I want to work with Cobra in go for build a cli and I setup a workspace in vscode that's my setting file

{
  "folders": [
    {
      // Source code
      "name": "pcli",
      "path": "/home/andruxuis/Documents/Go/ProjectsSetup_CLI"
    }
  ],
  "settings": {
    "editor.formatOnSave": true,
    "go.autocompleteUnimportedPackages": true
  },
}

I did generate a Cobra project with

    cobra init --pkg-name projectName

but I have the following Error in my go.mod file in the project root

go [-e -json -compiled=true -test=true -export=false -deps=true -find=false -- builtin pcli/...]: exit status 1: go: updates to go.mod needed, disabled by -mod=readonly : packages.Load error

0 Answers0