Run go fmt
over the codebase
This commit is contained in:
parent
eb19aca921
commit
1d008a0aad
3 changed files with 15 additions and 19 deletions
|
@ -69,7 +69,6 @@ func (f *logServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
serveFile(w, r, upath)
|
serveFile(w, r, upath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func serveFile(w http.ResponseWriter, r *http.Request, path string) {
|
func serveFile(w http.ResponseWriter, r *http.Request, path string) {
|
||||||
d, err := os.Stat(path)
|
d, err := os.Stat(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -182,7 +181,6 @@ func serveTarball(w http.ResponseWriter, r *http.Request, dir string) error {
|
||||||
targz := tar.NewWriter(gzip)
|
targz := tar.NewWriter(gzip)
|
||||||
defer targz.Close()
|
defer targz.Close()
|
||||||
|
|
||||||
|
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
if file.IsDir() {
|
if file.IsDir() {
|
||||||
// We avoid including nested directories
|
// We avoid including nested directories
|
||||||
|
|
2
main.go
2
main.go
|
@ -180,7 +180,7 @@ func main() {
|
||||||
log.Fatal(http.ListenAndServe(*bindAddr, nil))
|
log.Fatal(http.ListenAndServe(*bindAddr, nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
func configureGenericWebhookClient(cfg *config) (*http.Client) {
|
func configureGenericWebhookClient(cfg *config) *http.Client {
|
||||||
if len(cfg.GenericWebhookURLs) == 0 {
|
if len(cfg.GenericWebhookURLs) == 0 {
|
||||||
fmt.Println("No generic_webhook_urls configured.")
|
fmt.Println("No generic_webhook_urls configured.")
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -77,7 +77,6 @@ type jsonLogEntry struct {
|
||||||
Lines string `json:"lines"`
|
Lines string `json:"lines"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type genericWebhookPayload struct {
|
type genericWebhookPayload struct {
|
||||||
parsedPayload
|
parsedPayload
|
||||||
ReportURL string `json:"report_url"`
|
ReportURL string `json:"report_url"`
|
||||||
|
@ -554,7 +553,6 @@ func (s *submitServer) sendGenericWebhook(req *http.Request) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, listingURL string, resp *submitResponse) error {
|
func (s *submitServer) submitGithubIssue(ctx context.Context, p parsedPayload, listingURL string, resp *submitResponse) error {
|
||||||
if s.ghClient == nil {
|
if s.ghClient == nil {
|
||||||
return nil
|
return nil
|
||||||
|
|
Reference in a new issue