mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-23 22:02:28 +00:00
added flags to specify the hooks json file path, ip and port the webhook should serve on
This commit is contained in:
parent
ffabc5541e
commit
c70c21fda7
4 changed files with 19 additions and 9 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue