go-watch

command module
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

README

install:
go get -u github.com/Lemo-yxk/go-watch

use:
1.create file name .watch in you project
2.write start shell
3.go-watch --path /you/project/path
4.or you can cd /you/project/path and run go-watch

watch file like this:
[ignore]
.idea
.git
.watch
vendor
node_modules
main

[command]
#
# you command
# whatever will be executed
# example: ls
#
# dir or file: you command
# variable: $DIR = project dir
# execute when the dir or file has changed
# example: echo $PATH
#          main.go: echo hello
#          .: go run main.go
#          .: go run $DIR/main.go
#          ./src: ls
#          ./test*: echo test
#

go run main.go

[host]
# http://127.0.0.1:12365
# http://127.0.0.1:12365/reload?name=.
# http://127.0.0.1:12365/reload
# http://127.0.0.1:12365/reload?name=$DIR
# http://127.0.0.1:12365/reload?name=./src
# http://127.0.0.1:12365/reload?name=./src*

http://127.0.0.1:12365/reload

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL