草庐IT

apt-packages

全部标签

go - 为什么我可以使用 packages 方法,当它说它属于不同的类型时?

对于可怕的标题感到抱歉,首先,如果有人在阅读我的问题后可以提供更好的标题的编辑,请提交,我现在的术语很糟糕。所以,简单的问题:通读net/http包,了解如何发出http.Get请求,它说我所要做的就是resp,err:=http.Get(blah)好吧,向下滚动列表以查看此Get函数采用了哪些参数,我无法直接在http包的函数下找到它所以向下滚动我在typeClient下找到了一个Get方法那么为什么我不必首先http.Client然后向它​​发出Get请求呢?只是有点困惑。谢谢你的帮助。 最佳答案 这是该方法的两个不同版本。在一

dns - Dockerfile : Docker build can't download packages: centos->yum, debian/ubuntu->apt-get 在内网后面

问题:任何使用依赖于centos、ubuntu或debian的Dockerfile的构建都无法构建。环境:我有一个MacOSX,运行VMWare和一个guestUbuntu14.04,运行Docker:mdesales@ubuntu~$sudodockerversionClientversion:1.1.2ClientAPIversion:1.13Goversion(client):go1.2.1Gitcommit(client):d84a070Serverversion:1.1.2ServerAPIversion:1.13Goversion(server):go1.2.1Gitcom

dns - Dockerfile : Docker build can't download packages: centos->yum, debian/ubuntu->apt-get 在内网后面

问题:任何使用依赖于centos、ubuntu或debian的Dockerfile的构建都无法构建。环境:我有一个MacOSX,运行VMWare和一个guestUbuntu14.04,运行Docker:mdesales@ubuntu~$sudodockerversionClientversion:1.1.2ClientAPIversion:1.13Goversion(client):go1.2.1Gitcommit(client):d84a070Serverversion:1.1.2ServerAPIversion:1.13Goversion(server):go1.2.1Gitcom

Golang Dockerfile : Unable to find packages in docker build but runs normally

我的golang微服务项目的多阶段构建有以下dockerfile设置FROMgolang:alpineasbuilderRUNapk--no-cacheaddgitWORKDIR/app/vessel-serviceCOPY..RUNgomoddownloadRUNCGO_ENABLED=0GOOS=linuxgobuild-a-installsuffixcgo-ovessel-service#SecondStage...我的main.go中有以下导入import("context""errors""fmt"pb"github.com/thededlier/go-micro-shipp

go - 无法在 MacOS 上安装 Revel "package gopkg.in/fsnotify.v1: unrecognized import path"

按照“GettingStarted”方向:$goget-vgithub.com/revel/revelFetchinghttps://gopkg.in/fsnotify.v1?go-get=1Parsingmetatagsfromhttps://gopkg.in/fsnotify.v1?go-get=1(statuscode404)packagegopkg.in/fsnotify.v1:unrecognizedimportpath"gopkg.in/fsnotify.v1"(parsehttps://gopkg.in/fsnotify.v1?go-get=1:nogo-importme

Go package wincred 在将密码从 []byte 转换为字符串时添加空格

我正在使用Windows凭据管理器通过wincredpackage为我在Go中构建的应用程序存储数据库凭据。它适用于检索由程序包本身创建的凭据的密码,但是对于直接通过Windows凭据管理器创建的凭据,程序包在从[]字节转换为字符串时在字符之间添加“空格”(字节“0”).//Retrieveacredentialobjectpackagemainimport("fmt""github.com/danieljoos/wincred")funcmain(){cred,err:=wincred.GetGenericCredential("myGoApplication")iferr==nil

go - 卡拉克斯 : package is not in any of the go paths

我试过使用kallax.当我尝试运行它时,我发现了这样的错误:panic:parseutil:packageisnotinanyofthegopathsgoroutine1[running]:gopkg.in/src-d/go-kallax.v1/generator.glob..func1(0x890120,0xc00015af60)/home/user/go/pkg/mod/gopkg.in/src-d/go-kallax.v1@v1.3.5/generator/template.go:491+0xa2GOPATH设置为/home/user/go,此外我使用vendoringGO11

ubuntu - 在 Docker 中,apt-get install 失败并出现 "Failed to fetch http://archive.ubuntu.com/... 404 Not Found"错误。为什么?我们怎样才能过去呢?

我的团队使用Docker(带有ubuntu:14.04基础镜像)进行本地开发,我们经常需要重建部分或全部镜像。但是我们经常会遇到使用apt-getinstall下载软件包失败的情况,即使在运行apt-get-yupdate之后也是如此。例如,今天我看到Errhttp://archive.ubuntu.com/ubuntu/trusty-security/mainlibxml2amd642.9.1+dfsg1-3ubuntu4.7404NotFound[IP:91.189.88.16180]Errhttp://archive.ubuntu.com/ubuntu/trusty-securi

ubuntu - 在 Docker 中,apt-get install 失败并出现 "Failed to fetch http://archive.ubuntu.com/... 404 Not Found"错误。为什么?我们怎样才能过去呢?

我的团队使用Docker(带有ubuntu:14.04基础镜像)进行本地开发,我们经常需要重建部分或全部镜像。但是我们经常会遇到使用apt-getinstall下载软件包失败的情况,即使在运行apt-get-yupdate之后也是如此。例如,今天我看到Errhttp://archive.ubuntu.com/ubuntu/trusty-security/mainlibxml2amd642.9.1+dfsg1-3ubuntu4.7404NotFound[IP:91.189.88.16180]Errhttp://archive.ubuntu.com/ubuntu/trusty-securi

go - 如何去 :generate stringer constants from multiple packages?

我有一个这样的结构:.foo/bar/constants.go.foo/constants.go.main.go在main.go中声明类型:packageagepacktypeEventTypeuint//go:generatestringer-typeEventTypeconst(FirstTypeEventTypeiotaSecondType....)在每个constants.go中我都有这样的东西:packagefooconst(OneMoreTypeagepack.EventType=100+iota)如何使用所有包的值生成stringer? 最佳答