Go run configuration gives incorrect permissions to Fleet-based development environment from Space

WBOY
Release: 2024-02-09 21:06:08
forward
557 people have browsed it

Go 运行配置为来自 Space 的基于 Fleet 的开发环境提供了错误权限

php editor Baicao introduced that the running configuration of the Go programming language can be achieved through a Fleet-based development environment, and provides the function of error permissions. This configuration can help developers better manage and debug Go programs and improve development efficiency. Using the Fleet-based development environment, developers can easily configure the Go operating environment and obtain error permissions to help them quickly locate and solve problems in the program. The introduction of this feature brings a more convenient and efficient development experience to Go language developers.

Question content

I'm running a fleet-based development environment in space (that's a cool quote, btw). This is a simple go program. If I open a terminal in fleet, I can successfully execute go run cm/server/main.go. But while creating the run configuration, I get permission returned returned (os error 13) error.

My run.json File:

{
  "configurations": [
    {
       "type": "go",
       "name": "localhost",
       "goExecPath": "cmd/server/main.go",
       "buildParams": [],
    },

    ]
}
Copy after login

Error:

Solution

EDIT: The problem is your configuration file.

It needs to look like this:

{
  "configurations": [
    {
      "type": "go",
      "name": "findAverage",
      "goExecPath": "/usr/local/go/bin/go",
      "buildParams": [
        "$PROJECT_DIR$/main.go",
      ],
      "runParams":  ["1", "2", "3"]
    }
  ]
}
Copy after login

goexecpath is the path to the go executable where you put the main.go file in buildparams.

source

The above is the detailed content of Go run configuration gives incorrect permissions to Fleet-based development environment from Space. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!