dqyuipw44576 2017-03-25 17:28
浏览 837

Go语言访问被拒绝

I'm new to the GO programming language, what I'm trying to do is to put some items into the map and then remove one of them, when I'm trying to remove one of the items from array I'm getting the error message:

C:/Go\bin\go.exe run C:/Users/Computer/IdeaProjects/untitled1/simple.go
fork/exec C:\Users\Computer\AppData\Local\Temp\go-build143466426\command-line-arguments\_obj\exe\simple.exe: Access is denied.

the code:

package main

import "fmt"

    func main(){

        presAge := make(map[string] int)

        presAge["test"] = 42
        presAge["boom"] = 421

        delete(presAge,"boom")

        fmt.Println(len(presAge))

    }
  • 写回答

2条回答 默认 最新

  • douwen1313 2017-03-25 17:59
    关注

    Your code is correct. You can run it via https://play.golang.org/ and it will print "1"

    The error you're getting is not a Go error but a Windows error. It looks like a permission problem (no idea why you're getting it)

    评论

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用