Skip to content

Commit f6e99d7

Browse files
committed
fix some typos
1 parent 97f9f9d commit f6e99d7

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ $ pet configure
308308
snippetdirs = ["/path/to/some/snippets/", "/more/snippets/"]
309309
...
310310
```
311-
If `snippetfile` setting is omitted, new snippets will be added in a seperate file to the first directory. The generated filename is time based.
311+
If `snippetfile` setting is omitted, new snippets will be added in a separate file to the first directory. The generated filename is time based.
312312

313313
Snippet files in `snippetdirs` will not be added to Gist or GitLab. You've to do version control manually.
314314

cmd/edit.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func edit(cmd *cobra.Command, args []string) (err error) {
4242
}
4343
}
4444
if snippetFilePath.Get() == "" {
45-
return errors.New("No snippet file seleted")
45+
return errors.New("No snippet file selected")
4646
}
4747

4848
// only sync if content has changed

path/path_unix_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func TestExpandPathWithTilde(t *testing.T) {
1414

1515
got, err := expandPath(test_path)
1616
if err != nil {
17-
t.Errorf("Error occured: %s", err)
17+
t.Errorf("Error occurred: %s", err)
1818
}
1919

2020
if got != want {
@@ -28,7 +28,7 @@ func TestNewAbsolutePathIsAbsolute(t *testing.T) {
2828

2929
absPath, err := NewAbsolutePath(test_path)
3030
if err != nil {
31-
t.Errorf("Error occured: %s", err)
31+
t.Errorf("Error occurred: %s", err)
3232
}
3333

3434
got := absPath.Get()
@@ -43,7 +43,7 @@ func TestExpandAbsolutePathDoesNothing(t *testing.T) {
4343

4444
got, err := expandPath(test_path)
4545
if err != nil {
46-
t.Errorf("Error occured: %s", err)
46+
t.Errorf("Error occurred: %s", err)
4747
}
4848

4949
if got != want {

path/path_windows_test.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ func TestExpandPathWithTilde(t *testing.T) {
1313

1414
homeDir, err := os.UserHomeDir()
1515
if err != nil {
16-
t.Errorf("Error occured: %s", err)
16+
t.Errorf("Error occurred: %s", err)
1717
}
1818
want := filepath.Join(homeDir, ".config", "pet")
1919

2020
got, err := expandPath(test_path)
2121
if err != nil {
22-
t.Errorf("Error occured: %s", err)
22+
t.Errorf("Error occurred: %s", err)
2323
}
2424

2525
if got != want {
@@ -31,13 +31,13 @@ func TestNewAbsolutePathIsAbsolute(t *testing.T) {
3131
test_path := "~/relative/path"
3232
homeDir, err := os.UserHomeDir()
3333
if err != nil {
34-
t.Errorf("Error occured: %s", err)
34+
t.Errorf("Error occurred: %s", err)
3535
}
3636
want := filepath.Join(homeDir, "relative", "path")
3737

3838
absPath, err := NewAbsolutePath(test_path)
3939
if err != nil {
40-
t.Errorf("Error occured: %s", err)
40+
t.Errorf("Error occurred: %s", err)
4141
}
4242

4343
got := absPath.Get()
@@ -50,18 +50,18 @@ func TestSetAbsolutePathIsAbsolute(t *testing.T) {
5050
test_path := "~/relative/path"
5151
homeDir, err := os.UserHomeDir()
5252
if err != nil {
53-
t.Errorf("Error occured: %s", err)
53+
t.Errorf("Error occurred: %s", err)
5454
}
5555
want := filepath.Join(homeDir, "relative", "path")
5656

5757
absPath, err := NewAbsolutePath("/whatever")
5858
if err != nil {
59-
t.Errorf("Error occured: %s", err)
59+
t.Errorf("Error occurred: %s", err)
6060
}
6161

6262
err = absPath.Set(test_path)
6363
if err != nil {
64-
t.Errorf("Error occured: %s", err)
64+
t.Errorf("Error occurred: %s", err)
6565
}
6666

6767
got := absPath.Get()
@@ -76,7 +76,7 @@ func TestExpandAbsolutePathDoesNothing(t *testing.T) {
7676

7777
got, err := expandPath(test_path)
7878
if err != nil {
79-
t.Errorf("Error occured: %s", err)
79+
t.Errorf("Error occurred: %s", err)
8080
}
8181

8282
if got != want {

0 commit comments

Comments
 (0)