Skip to content

Commit

Permalink
refactor: fix golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Mar 1, 2024
1 parent b889aad commit 3d92f00
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/vale/native.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,20 @@ func getNativeConfig() (string, error) {

switch runtime.GOOS {
case "windows":
cfg, err := xdg.ConfigFile("vale/native/config.json")
if err != nil {
return "", err
cfg, notFound := xdg.ConfigFile("vale/native/config.json")
if notFound != nil {
return "", notFound
}
return cfg, nil
case "linux":
path := filepath.Join(home, ".config/vale/native/config.json")
if err := mkdir(filepath.Dir(path)); err != nil {
if err = mkdir(filepath.Dir(path)); err != nil {
return "", err
}
return path, nil
case "darwin":
path := filepath.Join(home, "Library/Application Support/vale/native/config.json")
if err := mkdir(filepath.Dir(path)); err != nil {
if err = mkdir(filepath.Dir(path)); err != nil {
return "", err
}
return path, nil
Expand Down

0 comments on commit 3d92f00

Please sign in to comment.