mirror of
https://github.com/alvierahman90/gohookr.git
synced 2024-11-22 07:29:52 +00:00
Remove testing related code
This commit is contained in:
parent
cd2c0ff0fe
commit
242ae06cad
10
main.go
10
main.go
@ -20,16 +20,6 @@ var config_filename = "/etc/ghookr.json"
|
|||||||
var noSignatureCheck = false
|
var noSignatureCheck = false
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// Used for testing purposes... generates hmac string
|
|
||||||
if os.Getenv("HMACGEN") == "true" {
|
|
||||||
input, err := ioutil.ReadAll(os.Stdin)
|
|
||||||
secret := os.Getenv("SECRET")
|
|
||||||
if err != nil {
|
|
||||||
panic(err.Error())
|
|
||||||
}
|
|
||||||
fmt.Println(getSha256HMACSignature([]byte(secret), string(input)))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
r := mux.NewRouter()
|
r := mux.NewRouter()
|
||||||
r.HandleFunc("/webhook/{service}", webhook)
|
r.HandleFunc("/webhook/{service}", webhook)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user