mirror of
https://github.com/adnanh/webhook.git
synced 2026-07-27 01:29:16 +08:00
added flags to specify the hooks json file path, ip and port the webhook should serve on
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user