Skip to content

Commit

Permalink
Merge pull request #331 from alxgu/typos
Browse files Browse the repository at this point in the history
fix some typos
  • Loading branch information
RamiAwar authored Dec 3, 2024
2 parents acc929d + f6e99d7 commit f42e0b6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ $ pet configure
snippetdirs = ["/path/to/some/snippets/", "/more/snippets/"]
...
```
If `snippetfile` setting is omitted, new snippets will be added in a seperate file to the first directory. The generated filename is time based.
If `snippetfile` setting is omitted, new snippets will be added in a separate file to the first directory. The generated filename is time based.

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

Expand Down
2 changes: 1 addition & 1 deletion cmd/edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func edit(cmd *cobra.Command, args []string) (err error) {
}
}
if snippetFilePath.Get() == "" {
return errors.New("No snippet file seleted")
return errors.New("No snippet file selected")
}

// only sync if content has changed
Expand Down
6 changes: 3 additions & 3 deletions path/path_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func TestExpandPathWithTilde(t *testing.T) {

got, err := expandPath(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

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

absPath, err := NewAbsolutePath(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

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

got, err := expandPath(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

if got != want {
Expand Down
16 changes: 8 additions & 8 deletions path/path_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ func TestExpandPathWithTilde(t *testing.T) {

homeDir, err := os.UserHomeDir()
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}
want := filepath.Join(homeDir, ".config", "pet")

got, err := expandPath(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

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

absPath, err := NewAbsolutePath(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

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

absPath, err := NewAbsolutePath("/whatever")
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

err = absPath.Set(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

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

got, err := expandPath(test_path)
if err != nil {
t.Errorf("Error occured: %s", err)
t.Errorf("Error occurred: %s", err)
}

if got != want {
Expand Down

0 comments on commit f42e0b6

Please sign in to comment.