added flags to specify the hooks json file path, ip and port the webhook should serve on

This commit is contained in:
Adnan Hajdarevic 2015-01-13 00:59:18 +01:00
parent ffabc5541e
commit c70c21fda7
4 changed files with 19 additions and 9 deletions

View file

@ -103,6 +103,10 @@ func (h *Hook) UnmarshalJSON(j []byte) error {
func New(hookFile string) (*Hooks, error) {
h := &Hooks{fileName: hookFile}
if hookFile == "" {
return h, nil
}
// parse hook file for hooks
file, e := ioutil.ReadFile(hookFile)