X Tutup
Skip to content

Commit d6c9004

Browse files
authored
Merge pull request cli#2460 from cli/spell-check-fixes
Spell check fixes
2 parents 05a1a25 + a66a65d commit d6c9004

File tree

15 files changed

+23
-23
lines changed

15 files changed

+23
-23
lines changed

api/cache.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
func makeCachedClient(httpClient *http.Client, cacheTTL time.Duration) *http.Client {
2020
cacheDir := filepath.Join(os.TempDir(), "gh-cli-cache")
2121
return &http.Client{
22-
Transport: CacheReponse(cacheTTL, cacheDir)(httpClient.Transport),
22+
Transport: CacheResponse(cacheTTL, cacheDir)(httpClient.Transport),
2323
}
2424
}
2525

@@ -39,8 +39,8 @@ func isCacheableResponse(res *http.Response) bool {
3939
return res.StatusCode < 500 && res.StatusCode != 403
4040
}
4141

42-
// CacheReponse produces a RoundTripper that caches HTTP responses to disk for a specified amount of time
43-
func CacheReponse(ttl time.Duration, dir string) ClientOption {
42+
// CacheResponse produces a RoundTripper that caches HTTP responses to disk for a specified amount of time
43+
func CacheResponse(ttl time.Duration, dir string) ClientOption {
4444
fs := fileStorage{
4545
dir: dir,
4646
ttl: ttl,

api/cache_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/stretchr/testify/require"
1515
)
1616

17-
func Test_CacheReponse(t *testing.T) {
17+
func Test_CacheResponse(t *testing.T) {
1818
counter := 0
1919
fakeHTTP := funcTripper{
2020
roundTrip: func(req *http.Request) (*http.Response, error) {
@@ -32,7 +32,7 @@ func Test_CacheReponse(t *testing.T) {
3232
}
3333

3434
cacheDir := filepath.Join(t.TempDir(), "gh-cli-cache")
35-
httpClient := NewHTTPClient(ReplaceTripper(fakeHTTP), CacheReponse(time.Minute, cacheDir))
35+
httpClient := NewHTTPClient(ReplaceTripper(fakeHTTP), CacheResponse(time.Minute, cacheDir))
3636

3737
do := func(method, url string, body io.Reader) (string, error) {
3838
req, err := http.NewRequest(method, url, body)

context/remote_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ func Test_Remotes_FindByName(t *testing.T) {
2828
eq(t, err, nil)
2929
eq(t, r.Name, "upstream")
3030

31-
r, err = list.FindByName("nonexist", "*")
31+
r, err = list.FindByName("nonexistent", "*")
3232
eq(t, err, nil)
3333
eq(t, r.Name, "mona")
3434

35-
_, err = list.FindByName("nonexist")
35+
_, err = list.FindByName("nonexistent")
3636
eq(t, err, errors.New(`no GitHub remotes found`))
3737
}
3838

git/ssh_config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func Test_sshParse(t *testing.T) {
2525
`))
2626
eq(t, m["foo"], "example.com")
2727
eq(t, m["bar"], "%bar.net%")
28-
eq(t, m["nonexist"], "")
28+
eq(t, m["nonexistent"], "")
2929
}
3030

3131
func Test_Translator(t *testing.T) {

internal/config/config_file_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ example.com:
9090
val, err = config.Get("github.com", "git_protocol")
9191
eq(t, err, nil)
9292
eq(t, val, "ssh")
93-
val, err = config.Get("nonexist.io", "git_protocol")
93+
val, err = config.Get("nonexistent.io", "git_protocol")
9494
eq(t, err, nil)
9595
eq(t, val, "ssh")
9696
}

internal/docs/man_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func TestGenManSeeAlso(t *testing.T) {
106106
}
107107
}
108108

109-
func TestManPrintFlagsHidesShortDeperecated(t *testing.T) {
109+
func TestManPrintFlagsHidesShortDeprecated(t *testing.T) {
110110
c := &cobra.Command{}
111111
c.Flags().StringP("foo", "f", "default", "Foo flag")
112112
_ = c.Flags().MarkShorthandDeprecated("foo", "don't use it no more")

internal/run/stub.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func Stub() (*CommandStubber, func(T)) {
3939
return
4040
}
4141
t.Helper()
42-
t.Errorf("umatched stubs (%d): %s", len(unmatched), strings.Join(unmatched, ", "))
42+
t.Errorf("unmatched stubs (%d): %s", len(unmatched), strings.Join(unmatched, ", "))
4343
}
4444
}
4545

pkg/cmd/issue/create/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func TestIssueCreate_nonLegacyTemplate(t *testing.T) {
145145
as, teardown := prompt.InitAskStubber()
146146
defer teardown()
147147

148-
// tmeplate
148+
// template
149149
as.Stub([]*prompt.QuestionStub{
150150
{
151151
Name: "index",

pkg/cmd/pr/create/regexp_writer_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ func Test_Write(t *testing.T) {
9393
{
9494
name: "multiple lines removed",
9595
input: input{
96-
in: []string{"begining line\nremove this whole line\nremove this one also\nnot this one"},
96+
in: []string{"beginning line\nremove this whole line\nremove this one also\nnot this one"},
9797
re: regexp.MustCompile("(?s)^remove.*$"),
9898
repl: "",
9999
},
100100
output: output{
101101
wantsErr: false,
102-
out: "begining line\nnot this one",
103-
length: 70,
102+
out: "beginning line\nnot this one",
103+
length: 71,
104104
},
105105
},
106106
{

pkg/cmd/pr/review/review_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func TestPRReview(t *testing.T) {
319319
{`--request-changes -b"bad"`, "REQUEST_CHANGES", "bad"},
320320
{`--approve`, "APPROVE", ""},
321321
{`--approve -b"hot damn"`, "APPROVE", "hot damn"},
322-
{`--comment --body "i donno"`, "COMMENT", "i donno"},
322+
{`--comment --body "i dunno"`, "COMMENT", "i dunno"},
323323
}
324324

325325
for _, kase := range cases {

0 commit comments

Comments
 (0)
X Tutup