Skip to content

Commit

Permalink
fix(Config): Fix linter issues for the Config file package
Browse files Browse the repository at this point in the history
  • Loading branch information
HRemonen committed Oct 28, 2023
1 parent 8206c6c commit c3b09db
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/*
Package config provides functionality for reading, creating and modifying configuration files for CommitSense.
This file includes utility functions for interacting with configuration files.
Copyright © 2023 HENRI REMONEN <[email protected]>
*/
package config

import (
Expand All @@ -8,6 +15,7 @@ import (
"github.com/spf13/viper"
)

// UserHomeDir represents the path to the user's home directory.
var UserHomeDir string

var (
Expand All @@ -32,8 +40,8 @@ func init() {
UserHomeDir = homeDir
}

// ConfigFileExists checks if the configuration file exists in the user's home directory.
func ConfigFileExists() bool {
// Exists checks if the configuration file exists in the user's home directory.
func Exists() bool {
if fi, err := os.Stat(path.Join(UserHomeDir, configFile)); err != nil || fi.IsDir() {
return false
}
Expand Down Expand Up @@ -71,4 +79,4 @@ func CreateDefaultConfig() error {
CommitTypes: defaultCommitTypes,
SkipCITypes: defaultSkipCITypes,
})
}
}

0 comments on commit c3b09db

Please sign in to comment.