zoukankan      html  css  js  c++  java
  • goland debug web app with urfave cli

    使用urfave/cli 将应用当做命令行应用启动,定义 start参数来启动
    startCmd := cli.Command{Name: "start"}
    app.Commands = []cli.Command{versionCmd, startCmd}
    app.Run(os.Args)
    

    goland中一直不知道怎么debug 这种cli 启动的项目

    下午又研究了下 goland ,发现在 Programma params 中写 对应的start 参数即可

    不过启动配置里面要要默认定义好配置的名称,然后点击绿色的虫子debug 按钮就能正常启动; 

    goland 里面修改代码后让服务自动重启还没研究,之前用过fswatch,有文章推荐fresh 

    go get github.com/pilu/fresh

    有机会试试

    (https://swsmile.info/2020/01/12/【Golang】修改代码后自动重新编译并启动)

  • 相关阅读:
    数组与指针
    壁纸
    2019/1/11
    指针A
    数组B
    一起来抓老鼠啊!快乐呀!
    打印沙漏
    I think I need a boat house
    币值转换
    《C语言程序设计》编程总结汇总
  • 原文地址:https://www.cnblogs.com/lavin/p/12870564.html
Copyright © 2011-2022 走看看