-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update vendor deps; add webhookd-inflate-config tool
- Loading branch information
thisisaaronland
committed
Sep 8, 2020
1 parent
7db02c6
commit 20cdae7
Showing
453 changed files
with
59,392 additions
and
98,448 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,51 @@ | ||
package main | ||
|
||
import ( | ||
_ "context" | ||
"flag" | ||
"net/url" | ||
"log" | ||
"encoding/json" | ||
"fmt" | ||
"github.com/tidwall/pretty" | ||
"github.com/whosonfirst/go-webhookd/v3/config" | ||
) | ||
|
||
func main (){ | ||
|
||
flag.Parse() | ||
|
||
for _, uri := range flag.Args() { | ||
|
||
u, err := url.Parse(uri) | ||
|
||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
q := u.Query() | ||
|
||
val := q.Get("val") | ||
|
||
if val == "" { | ||
log.Fatal("Missing ?val parameter") | ||
} | ||
|
||
var cfg *config.WebhookConfig | ||
|
||
err = json.Unmarshal([]byte(val), &cfg) | ||
|
||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
body, err := json.Marshal(cfg) | ||
|
||
if err != nil { | ||
log.Fatal(err) | ||
} | ||
|
||
body = pretty.Pretty(body) | ||
fmt.Println(string(body)) | ||
} | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.