goimports
This commit is contained in:
parent
160d68f29c
commit
a45699efb1
|
|
@ -21,6 +21,7 @@ package main // import "k8s.io/git-sync/cmd/git-sync"
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
|
|
@ -33,7 +34,6 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
"github.com/thockin/glogr"
|
"github.com/thockin/glogr"
|
||||||
"github.com/thockin/logr"
|
"github.com/thockin/logr"
|
||||||
|
|
@ -198,7 +198,6 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// From here on, output goes through logging.
|
// From here on, output goes through logging.
|
||||||
log.V(0).Infof("starting up: %q", os.Args)
|
log.V(0).Infof("starting up: %q", os.Args)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Create an http client that has our timeout by default
|
// Create an http client that has our timeout by default
|
||||||
var netClient = &http.Client{
|
var netClient = &http.Client{
|
||||||
Timeout: time.Duration(time.Second * time.Duration(*flWebhookTimeout) ),
|
Timeout: time.Duration(time.Second * time.Duration(*flWebhookTimeout)),
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger channel for webhook requests. If anything is received into this channel
|
// Trigger channel for webhook requests. If anything is received into this channel
|
||||||
|
|
@ -55,7 +55,7 @@ func WebHookCall(url string, method string, statusCode *int) error {
|
||||||
func ServeWebhooks() {
|
func ServeWebhooks() {
|
||||||
for {
|
for {
|
||||||
// Wait for trigger
|
// Wait for trigger
|
||||||
<- WebhookCallTriggerChannel
|
<-WebhookCallTriggerChannel
|
||||||
|
|
||||||
// Calling webhook - one after another
|
// Calling webhook - one after another
|
||||||
for _, v := range WebhookArray {
|
for _, v := range WebhookArray {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue