小编alp*_*yan的帖子

Docker alpine golang go 出现针对coding.net 私有仓库的错误

我使用coding.net 创建了私有存储库。
我使用 docker images alpinecentos
我可以从 docker git.coding.net/alphayan/orionv2.git successful-centos获取,但不能git.coding.net/alphayan/test.git从 docker-alpine获取。它返回一个错误说明:

/go/src # go get -u -v  git.coding.net/alphayan/test.git
# cd .; git ls-remote https://git.coding.net/alphayan/test
fatal: could not read Username for 'https://git.coding.net': terminal prompts disabled
# cd .; git ls-remote git+ssh://git.coding.net/alphayan/test
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
# cd .; git ls-remote ssh://git.coding.net/alphayan/test
Permission denied (publickey).
fatal: Could …
Run Code Online (Sandbox Code Playgroud)

git go docker

6
推荐指数
1
解决办法
1366
查看次数

windows-如何在 golang 中获取屏幕分辨率

好人。

我需要获得 Windows 系统屏幕分辨率,但我无法通过谷歌获得任何有用的信息。

所以我在 stackoverflow 中寻求帮助。

有谁知道怎么做?

先谢谢了。

更新:然后我尝试这个命令wmic desktopmonitor get screenheight screenwidth并得到这样的答案:
这是cmd: 在此处输入图片说明

这是 Go 程序: 在此处输入图片说明

windows size screen go

4
推荐指数
2
解决办法
3613
查看次数

为什么这个关于golang goruntine运行顺序的代码首先是"2"

package main

import (
    "fmt"
    "sync"
)

func main() {
    runtime.GOMAXPROCS(1)
    w := &sync.WaitGroup{}
    w.Add(2)
    go func() {
        fmt.Println("1")
        w.Done()
    }()
    go func() {
        fmt.Println("2")
        w.Done()
    }()
    w.Wait()
}
Run Code Online (Sandbox Code Playgroud)

https://play.golang.org/p/ESi1mKAo1x_S

呃,我不知道为什么"2"首先打印.

我想检查一下这些信息.但是我不知道应该检查什么信息.所以我在那里发帖提问求助.

我认为第一个goroutine是第一个推入队列.它应该先打印.

go goroutine

1
推荐指数
1
解决办法
62
查看次数

标签 统计

go ×3

docker ×1

git ×1

goroutine ×1

screen ×1

size ×1

windows ×1