-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release version 0.1.1 - New cli feature: rizla -onreload=myscript.sh …
…main.go | Read HISTORY.md
- Loading branch information
Showing
6 changed files
with
130 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Package main shows you how you can execute commands on reload | ||
// in this example we will execute a simple bat file on windows | ||
// but you can pass anything, it just runs the `exec.Command` based on -onreload= flag's value. | ||
package main | ||
|
||
import ( | ||
"flag" | ||
"fmt" | ||
) | ||
|
||
// rizla -onreload="on_reload.bat" main.go -host myhost.com -port 1193 | ||
func main() { | ||
host := flag.String("host", "", "the host") | ||
port := flag.Int("port", 0, "the port") | ||
flag.Parse() | ||
fmt.Printf("The 'host' argument is: %v\n", *host) | ||
fmt.Printf("The 'port' argument is: %v\n", *port) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
@echo off | ||
echo Hello, custom script can goes here before reload, i.e build https://github.comkataras/bindata things! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters