Skip to content

Commit e9f5269

Browse files
authored
Fix typos (#3048)
1 parent 207a38d commit e9f5269

8 files changed

Lines changed: 12 additions & 9 deletions

File tree

‎example/newfilewithappauth/main.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func main() {
2929

3030
itr, err := ghinstallation.NewAppsTransport(http.DefaultTransport, 10, privatePem)
3131
if err != nil {
32-
log.Fatalf("faild to create app transport: %v\n", err)
32+
log.Fatalf("failed to create app transport: %v\n", err)
3333
}
3434
itr.BaseURL = gitHost
3535

@@ -42,7 +42,7 @@ func main() {
4242
).WithEnterpriseURLs(gitHost, gitHost)
4343

4444
if err != nil {
45-
log.Fatalf("faild to create git client for app: %v\n", err)
45+
log.Fatalf("failed to create git client for app: %v\n", err)
4646
}
4747

4848
installations, _, err := client.Apps.ListInstallations(context.Background(), &github.ListOptions{})

‎github/dependabot_alerts.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"fmt"
1111
)
1212

13-
// Dependency reprensents the vulnerable dependency.
13+
// Dependency represents the vulnerable dependency.
1414
type Dependency struct {
1515
Package *VulnerabilityPackage `json:"package,omitempty"`
1616
ManifestPath *string `json:"manifest_path,omitempty"`
@@ -23,7 +23,7 @@ type AdvisoryCVSS struct {
2323
VectorString *string `json:"vector_string,omitempty"`
2424
}
2525

26-
// AdvisoryCWEs reprensent the advisory pertaining to Common Weakness Enumeration.
26+
// AdvisoryCWEs represent the advisory pertaining to Common Weakness Enumeration.
2727
type AdvisoryCWEs struct {
2828
CWEID *string `json:"cwe_id,omitempty"`
2929
Name *string `json:"name,omitempty"`

‎github/event_types.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ type ReleaseEvent struct {
13891389

13901390
// RepositoryEvent is triggered when a repository is created, archived, unarchived,
13911391
// renamed, edited, transferred, made public, or made private. Organization hooks are
1392-
// also trigerred when a repository is deleted.
1392+
// also triggered when a repository is deleted.
13931393
// The Webhook event name is "repository".
13941394
//
13951395
// Events of this type are not visible in timelines, they are only used to

‎github/github.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,7 @@ func (c *Client) BareDo(ctx context.Context, req *http.Request) (*Response, erro
901901
// JSON decoded and stored in the value pointed to by v, or returned as an
902902
// error if an API error has occurred. If v implements the io.Writer interface,
903903
// the raw response body will be written to v, without attempting to first
904-
// decode it. If v is nil, and no error hapens, the response is returned as is.
904+
// decode it. If v is nil, and no error happens, the response is returned as is.
905905
// If rate limit is exceeded and reset time is in the future, Do returns
906906
// *RateLimitError immediately without making a network API call.
907907
//

‎github/strings_test.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func TestStringify(t *testing.T) {
8080
}
8181

8282
// Directly test the String() methods on various GitHub types. We don't do an
83-
// exaustive test of all the various field types, since TestStringify() above
83+
// exhaustive test of all the various field types, since TestStringify() above
8484
// takes care of that. Rather, we just make sure that Stringify() is being
8585
// used to build the strings, which we do by verifying that pointers are
8686
// stringified as their underlying value.

‎github/teams_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ func TestTeamsService_AddTeamRepoByID_noAccess(t *testing.T) {
872872
ctx := context.Background()
873873
_, err := client.Teams.AddTeamRepoByID(ctx, 1, 1, "owner", "repo", nil)
874874
if err == nil {
875-
t.Errorf("Expcted error to be returned")
875+
t.Errorf("Expected error to be returned")
876876
}
877877
}
878878

@@ -888,7 +888,7 @@ func TestTeamsService_AddTeamRepoBySlug_noAccess(t *testing.T) {
888888
ctx := context.Background()
889889
_, err := client.Teams.AddTeamRepoBySlug(ctx, "org", "slug", "owner", "repo", nil)
890890
if err == nil {
891-
t.Errorf("Expcted error to be returned")
891+
t.Errorf("Expected error to be returned")
892892
}
893893
}
894894

‎tools/metadata/testdata/update-go/invalid/github/a.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ func (*AService) Ambiguous() {}
1818
func (*AService) MissingOperation() {}
1919

2020
// DuplicateOperations has duplicate operations
21+
//
2122
//meta:operation GET /a/{a_id}
2223
//meta:operation POST /a/{a_id}
2324
//meta:operation GET /a/{a_id}

‎tools/metadata/testdata/update-go/valid/github/a.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ package github
33
type AService struct{}
44

55
// Get gets an A
6+
//
67
//meta:operation GET /a/{non-canonical-id}
78
func (s *AService) Get() {}
89

910
// Undocumented uses an undocumented operation
11+
//
1012
//meta:operation GET /undocumented/{undocumented_id}
1113
func (s *AService) Undocumented() {}
1214

0 commit comments

Comments
 (0)