Skip to content
This repository has been archived by the owner on Jun 4, 2021. It is now read-only.

Commit

Permalink
golang format tools (#786)
Browse files Browse the repository at this point in the history
Produced via:
  `gofmt -s -w $(find -path './vendor' -prune -o -type f -name '*.go' -print))`
  `goimports -w $(find -name '*.go' | grep -v vendor)`
/assign n3wscott
  • Loading branch information
mattmoor authored and knative-prow-robot committed Dec 9, 2019
1 parent e107848 commit c409ee0
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
3 changes: 2 additions & 1 deletion ceph/cmd/receive_adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ package main

import (
"flag"
"knative.dev/eventing-contrib/ceph/pkg/adapter"
"log"

"knative.dev/eventing-contrib/ceph/pkg/adapter"
)

func main() {
Expand Down
7 changes: 4 additions & 3 deletions ceph/pkg/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ package adapter
import (
"context"
"encoding/json"
cloudevents "github.com/cloudevents/sdk-go"
"io/ioutil"
ceph "knative.dev/eventing-contrib/ceph/pkg/apis/v1alpha1"
"knative.dev/eventing-contrib/pkg/kncloudevents"
"log"
"net/http"
"time"

cloudevents "github.com/cloudevents/sdk-go"
ceph "knative.dev/eventing-contrib/ceph/pkg/apis/v1alpha1"
"knative.dev/eventing-contrib/pkg/kncloudevents"
)

var theClient cloudevents.Client
Expand Down
3 changes: 2 additions & 1 deletion ceph/pkg/adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ import (
"bytes"
"encoding/json"
"io/ioutil"
ceph "knative.dev/eventing-contrib/ceph/pkg/apis/v1alpha1"
"net/http"
"net/http/httptest"
"testing"
"time"

ceph "knative.dev/eventing-contrib/ceph/pkg/apis/v1alpha1"
)

var notification1 = ceph.BucketNotification{
Expand Down
14 changes: 7 additions & 7 deletions github/pkg/adapter/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,13 +539,13 @@ func TestHandleEvent(t *testing.T) {

expectedRequest := requestValidation{
Headers: map[string][]string{
"ce-specversion": {"1.0"},
"ce-id": {"12345"},
"ce-time": {"2019-01-29T09:35:10.69383396-08:00"},
"ce-type": {"dev.knative.source.github.pull_request"},
"ce-source": {testSource},
"ce-subject": {testSubject},
"content-type": {"application/json"},
"ce-specversion": {"1.0"},
"ce-id": {"12345"},
"ce-time": {"2019-01-29T09:35:10.69383396-08:00"},
"ce-type": {"dev.knative.source.github.pull_request"},
"ce-source": {testSource},
"ce-subject": {testSubject},
"content-type": {"application/json"},
},
Body: `{"action":"","number":0,"pull_request":{"url":"","id":0,"node_id":"","html_url":"","diff_url":"","patch_url":"","issue_url":"","number":1234,"state":"","locked":false,"title":"","user":{"login":"","id":0,"node_id":"","avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"body":"","created_at":"0001-01-01T00:00:00Z","updated_at":"0001-01-01T00:00:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":null,"milestone":null,"commits_url":"","review_comments_url":"","review_comment_url":"","comments_url":"","statuses_url":"","labels":null,"head":{"label":"","ref":"","sha":"","user":{"login":"","id":0,"node_id":"","avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"repo":{"id":0,"node_id":"","name":"","full_name":"","owner":{"login":"","id":0,"node_id":"","avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"private":false,"html_url":"","description":"","fork":false,"url":"","forks_url":"","keys_url":"","collaborators_url":"","teams_url":"","hooks_url":"","issue_events_url":"","events_url":"","assignees_url":"","branches_url":"","tags_url":"","blobs_url":"","git_tags_url":"","git_refs_url":"","trees_url":"","statuses_url":"","languages_url":"","stargazers_url":"","contributors_url":"","subscribers_url":"","subscription_url":"","commits_url":"","git_commits_url":"","comments_url":"","issue_comment_url":"","contents_url":"","compare_url":"","merges_url":"","archive_url":"","downloads_url":"","issues_url":"","pulls_url":"","milestones_url":"","notifications_url":"","labels_url":"","releases_url":"","created_at":"0001-01-01T00:00:00Z","updated_at":"0001-01-01T00:00:00Z","pushed_at":"0001-01-01T00:00:00Z","git_url":"","ssh_url":"","clone_url":"","svn_url":"","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":""}},"base":{"label":"","ref":"","sha":"","user":{"login":"","id":0,"node_id":"","avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"repo":{"id":0,"node_id":"","name":"","full_name":"","owner":{"login":"","id":0,"node_id":"","avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"private":false,"html_url":"","description":"","fork":false,"url":"","forks_url":"","keys_url":"","collaborators_url":"","teams_url":"","hooks_url":"","issue_events_url":"","events_url":"","assignees_url":"","branches_url":"","tags_url":"","blobs_url":"","git_tags_url":"","git_refs_url":"","trees_url":"","statuses_url":"","languages_url":"","stargazers_url":"","contributors_url":"","subscribers_url":"","subscription_url":"","commits_url":"","git_commits_url":"","comments_url":"","issue_comment_url":"","contents_url":"","compare_url":"","merges_url":"","archive_url":"","downloads_url":"","issues_url":"","pulls_url":"","milestones_url":"","notifications_url":"","labels_url":"","releases_url":"","created_at":"0001-01-01T00:00:00Z","updated_at":"0001-01-01T00:00:00Z","pushed_at":"0001-01-01T00:00:00Z","git_url":"","ssh_url":"","clone_url":"","svn_url":"","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":""}},"_links":{"self":{"href":""},"html":{"href":""},"issue":{"href":""},"comments":{"href":""},"review_comments":{"href":""},"review_comment":{"href":""},"commits":{"href":""},"statuses":{"href":""}},"merged":false,"mergeable":null,"mergeable_state":"","merged_by":null,"comments":0,"review_comments":0,"commits":0,"additions":0,"deletions":0,"changed_files":0},"label":{"id":0,"node_id":"","description":"","url":"","name":"","color":"","default":false},"repository":{"id":0,"node_id":"","name":"","full_name":"","owner":{"login":"","node_id":"","id":0,"avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"private":false,"html_url":"","description":"","fork":false,"url":"","forks_url":"","keys_url":"","collaborators_url":"","teams_url":"","hooks_url":"","issue_events_url":"","events_url":"","assignees_url":"","branches_url":"","tags_url":"","blobs_url":"","git_tags_url":"","git_refs_url":"","trees_url":"","statuses_url":"","languages_url":"","stargazers_url":"","contributors_url":"","subscribers_url":"","subscription_url":"","commits_url":"","git_commits_url":"","comments_url":"","issue_comment_url":"","contents_url":"","compare_url":"","merges_url":"","archive_url":"","downloads_url":"","issues_url":"","pulls_url":"","milestones_url":"","notifications_url":"","labels_url":"","releases_url":"","created_at":"0001-01-01T00:00:00Z","updated_at":"0001-01-01T00:00:00Z","pushed_at":"0001-01-01T00:00:00Z","git_url":"","ssh_url":"","clone_url":"","svn_url":"","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":""},"sender":{"login":"","id":0,"node_id":"","avatar_url":"","gravatar_id":"","url":"","html_url":"","followers_url":"","following_url":"","gists_url":"","starred_url":"","subscriptions_url":"","organizations_url":"","repos_url":"","events_url":"","received_events_url":"","type":"","site_admin":false},"assignee":null,"requested_reviewer":null,"requested_team":{"name":"","id":0,"node_id":"","slug":"","description":"","privacy":"","url":"","html_url":"","members_url":"","repositories_url":"","permission":""},"installation":{"id":0}}`,
}
Expand Down
1 change: 0 additions & 1 deletion kafka/source/pkg/adapter/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ func makeEventSubject(partion int32, offset int64) string {
return fmt.Sprintf("partion:%d#%d", partion, offset)
}


// verifyCertSkipHostname verifies certificates in the same way that the
// default TLS handshake does, except it skips hostname verification. It must
// be used with InsecureSkipVerify.
Expand Down

0 comments on commit c409ee0

Please sign in to comment.