dqst96444 2012-05-15 12:58
浏览 97
已采纳

go / geany:配置构建命令

With an old version of go I could configure the build command in geany as

go install "%d"

But it seems that in Go1 you cannot provide to go install the absolute path.

So I'd like to have a command enabling me in geany to run

go install mypackagename

when my edited file is

/some/path/to/my/project/go/src/mypackagename/editedfile.go

What can I put in the settings to obtain that ?

Please consider that I'm a linux noob and that there may exist a trivial solution using a combination of standard shell commands.

  • 写回答

4条回答 默认 最新

  • duanaoreng9355 2012-09-16 21:01
    关注

    I would try something like

    cd "%d" && go install
    

    It changes the current working directory to the directory supplied by geany and runs go install if the directory change was successful.

    This only works if geany is executing the build commands in a shell. Without that, there's no cd (the shell provides it as an inbuilt command) and this solution won't work.

    Your only hope then is, to configure the current working dir for the build process in geany.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘