Skip to content

mengdu/hotgo-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hotgo-cli

Watching go file change and go run it.

Used instead of go run main.go

Install:

npm install -g hotgo-cli

Usage:

hotgo --watch="**/*.go" main.go
Usage: hotgo [options] <entry> [dest]

Watch go file change and go run it.

Options:
  -V, --version       output the version number
  -w, --watch <path>  watch directory path or files.
  -c --config <file>  Specify configuration file.
  --execArgs <args>   Execution parameters.
  --buildArgs <args>  Build parameters.
  --env <envs>        Execution environment.
  -h, --help          display help for command

Specify configuration file hotgo.jcon.

Example:

{
    "restartable": "rs",
    "delay": 500,
    "ignore": [
        "node_modules",
        "*.js"
    ],
    "watch": [
        "**/*.json",
        "**/*.js"
    ],
    "buildArgs": [
        "-ldflags '-w -s'"
    ],
    "execArgs": [],
    "env": {
        "PORT": "4000"
    }
}

About

Watching go file change and go run it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published