summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 12:50:23 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-11-28 12:50:23 +0100
commit7bab6c76599fdfd34ea9bb064d871ed2be01d4c8 (patch)
tree8200ead8926c0c5f11f750698760a0bcd93c230c /internal/config
parent7339e77c6eda5b96874dfc099d5c58da8ed53629 (diff)
Lint: Run godot fix
Full command: golangci-lint run --disable-all -E godot --fix
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index fa3045b..bea97f7 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -12,7 +12,7 @@ import (
"github.com/eduvpn/eduvpn-common/types"
)
-// Config represents a configuration that saves the client's struct as JSON
+// Config represents a configuration that saves the client's struct as JSON.
type Config struct {
// Directory represents the path to where the data is saved
Directory string
@@ -21,20 +21,20 @@ type Config struct {
Name string
}
-// Init initializes the configuration using the provided directory and name
+// Init initializes the configuration using the provided directory and name.
func (config *Config) Init(directory string, name string) {
config.Directory = directory
config.Name = name
}
-// filename returns the filename of the configuration as a full path
+// filename returns the filename of the configuration as a full path.
func (config *Config) filename() string {
pathString := path.Join(config.Directory, config.Name)
return fmt.Sprintf("%s.json", pathString)
}
// Save saves a structure 'readStruct' to the configuration
-// If it was unusuccessful, an an error is returned
+// If it was unusuccessful, an an error is returned.
func (config *Config) Save(readStruct interface{}) error {
errorMessage := "failed saving configuration"
configDirErr := util.EnsureDirectory(config.Directory)