From 7bab6c76599fdfd34ea9bb064d871ed2be01d4c8 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 28 Nov 2022 12:50:23 +0100 Subject: Lint: Run godot fix Full command: golangci-lint run --disable-all -E godot --fix --- internal/config/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/config') 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) -- cgit v1.2.3