Go Auto-Recompile and Reload Server on file change

后端 未结 9 877
清酒与你
清酒与你 2020-12-15 22:14

I know AppEngine does this, but I\'m not coding for it.

I tried using Guard from Ruby world, to listen on changes on .go files, and execut

相关标签:
9条回答
  • 2020-12-15 23:03

    I used a tool called entr

    To install brew install entr (mac)
    or, sudo apt-get install entr (linux)

    To recompile & run on .go file changes, run the following command ...

    ls **/*.go | entr go run main.go
    
    0 讨论(0)
  • 2020-12-15 23:06

    You can also try out Gin by Codegangsta. It's fire and forget.

    https://github.com/codegangsta/gin

    EDIT: I prefer CompileDaemon nowadays. Gin sometimes won't accept requests

    0 讨论(0)
  • 2020-12-15 23:06

    there are 2 main contenders here in GO world fresh & glide

    But I will go with Fresh https://github.com/gravityblast/fresh

    0 讨论(0)
提交回复
热议问题