mirror of
https://github.com/alvierahman90/gohookr.git
synced 2024-11-21 21:29:53 +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
|
||||
|
||||
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.HandleFunc("/webhook/{service}", webhook)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user