草庐IT

heroku-cli

全部标签

command-line - 如何从 Go 运行 CLI 命令?

如何从Go程序运行Gulp任务?这是我从典型终端运行的命令:gulpserv.dev我如何从golang运行这行简单的代码:packagemainimport("net/http""github.com/julienschmidt/httprouter""fmt")funcmain(){//WhatdoIputheretoopenterminalinbackgroundandrun`gulpserv.dev`?} 最佳答案 您要找的是exec.Command您非常希望生成一个进程来运行您的gulp任务。可以这样做:packagema

转到项目结构以在单个存储库中生成具有相同名称的库和 cli

如何设置项目结构以生成具有相同名称的库和cli单一存储库?假设我的项目名称是project。我想让它可以用名字导入project并在安装时具有名称为project的可执行二进制文件去获取。我目前的设置是这样的:host.com/project/project/main.gocore/project.go然后,当安装时:gogethost.com/project/project它将project安装为可执行文件,将core作为依赖。在core/project.go文件,包中有这个:packageproject问题是它是导入的:import("host.com/project/core")

转到项目结构以在单个存储库中生成具有相同名称的库和 cli

如何设置项目结构以生成具有相同名称的库和cli单一存储库?假设我的项目名称是project。我想让它可以用名字导入project并在安装时具有名称为project的可执行二进制文件去获取。我目前的设置是这样的:host.com/project/project/main.gocore/project.go然后,当安装时:gogethost.com/project/project它将project安装为可执行文件,将core作为依赖。在core/project.go文件,包中有这个:packageproject问题是它是导入的:import("host.com/project/core")

heroku - 使用 Go 的 Telegram Bot API Webhooks,Heroku 上的 GoLang

我使用go-telegram-bot-api构建TelegramBot并将其部署在Heroku上。我需要像以前在Python中那样设置WebhooksinthisPythoncase.无法理解如何在不提供证书文件的情况下在go-telegram-bot-api中设置Webhook。主要示例包含这样几行:Ifyouneedtousewebhooks(ifyouwishtorunonGoogleAppEngine),youmayuseaslightlydifferentmethod.packagemainimport("gopkg.in/telegram-bot-api.v4""log""

heroku - 使用 Go 的 Telegram Bot API Webhooks,Heroku 上的 GoLang

我使用go-telegram-bot-api构建TelegramBot并将其部署在Heroku上。我需要像以前在Python中那样设置WebhooksinthisPythoncase.无法理解如何在不提供证书文件的情况下在go-telegram-bot-api中设置Webhook。主要示例包含这样几行:Ifyouneedtousewebhooks(ifyouwishtorunonGoogleAppEngine),youmayuseaslightlydifferentmethod.packagemainimport("gopkg.in/telegram-bot-api.v4""log""

heroku - Go 应用程序的依赖项未通过 Heroku 上的 godep 安装

我想在Heroku上部署Go应用程序,但出现如下错误:remote:----->Goappdetectedremote:----->CheckingGodeps/Godeps.jsonfile.remote:----->Usinggo1.6.3remote:!!Installingpackage'.'(default)remote:!!remote:!!remote:----->Running:goinstall-v-tagsheroku.remote:main.go:9:2:cannotfindpackage"github.com/go-martini/martini"inanyof

heroku - Go 应用程序的依赖项未通过 Heroku 上的 godep 安装

我想在Heroku上部署Go应用程序,但出现如下错误:remote:----->Goappdetectedremote:----->CheckingGodeps/Godeps.jsonfile.remote:----->Usinggo1.6.3remote:!!Installingpackage'.'(default)remote:!!remote:!!remote:----->Running:goinstall-v-tagsheroku.remote:main.go:9:2:cannotfindpackage"github.com/go-martini/martini"inanyof

git - Heroku local 没有使用我的最新代码。为什么?

我正在尝试让一个非常简单的数据库支持的golangheroku应用程序作为一个helloworld工作。我的应用程序部署的Heroku版本运行良好,如果我在本地手动测试它,它运行良好,但herokulocal顽固地使用我的旧版本代码。具体来说:$herokulocalforego|startingweb.1onport8080有效,但出乎意料地服务于旧版本的应用程序。另一方面,这:$gorunweb.go还有这个:$gitpushherokumasterEverythingup-to-date$herokuopen两者都符合我的预期,这是我的代码的最新版本。这让我很困惑。我已阅读所有文

git - Heroku local 没有使用我的最新代码。为什么?

我正在尝试让一个非常简单的数据库支持的golangheroku应用程序作为一个helloworld工作。我的应用程序部署的Heroku版本运行良好,如果我在本地手动测试它,它运行良好,但herokulocal顽固地使用我的旧版本代码。具体来说:$herokulocalforego|startingweb.1onport8080有效,但出乎意料地服务于旧版本的应用程序。另一方面,这:$gorunweb.go还有这个:$gitpushherokumasterEverythingup-to-date$herokuopen两者都符合我的预期,这是我的代码的最新版本。这让我很困惑。我已阅读所有文

git - 如何删除本地 git 文件夹中对旧 Heroku 应用程序的引用?

我删除了一个重新初始化本地存储库的heroku应用程序,但是当我尝试添加新的远程存储库时,它不会让我添加新的远程存储库,因为远程存储库已经存在但具有旧名称。我尝试重命名,但这也不起作用,因为旧应用程序当然不再存在。当我运行“gitremote-v”时,我得到:herokugit@heroku.com:fierce-reef-7370.git(fetch)herokugit@heroku.com:fierce-reef-7370.git(push)两者都引用了旧应用程序。我不知道如何删除这些以便我可以推送到新的远程heroku应用程序。谢谢。 最佳答案