Skip to content

Commit

Permalink
Following documentation convention as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
orpheuslummis committed Jun 29, 2022
1 parent f4a7a93 commit 77de77c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (cfg *Config) WriteConfigFileToRootDir(rootDir string) error {
return cfg.writeConfigFile(path)
}

// Must reflect Config in content and configuration.
// defaultConfigTemplate must reflect Config in content and configuration.
// All parameters must be represented here, to support Viper's automatic environment variable handling.
const defaultConfigTemplate = `# DefraDB configuration (YAML)
Expand Down
6 changes: 3 additions & 3 deletions config/rootdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"path/filepath"
)

// Returns the default rootdir path, which is at the user's home directory.
// DefaultRootDir returns the default rootdir path, which is at the user's home directory.
func DefaultRootDir() (string, error) {
home, err := os.UserHomeDir()
if err != nil {
Expand All @@ -24,7 +24,7 @@ func DefaultRootDir() (string, error) {
return filepath.Join(home, defaultDefraDBRootDir), nil
}

// Returns rootdir path and whether it exists as directory, considering the env. variable and CLI flag.
// GetRootDir returns rootdir path and whether it exists as directory, considering the env. variable and CLI flag.
func GetRootDir(rootDir string) (string, bool, error) {
var err error
var path string
Expand All @@ -48,7 +48,7 @@ func GetRootDir(rootDir string) (string, bool, error) {
return path, exists, nil
}

// Creates a rootdir with default configuration.
// CreateRootDirWithDefaultConfig creates a rootdir with default configuration.
func CreateRootDirWithDefaultConfig(rootDir string) error {
err := os.MkdirAll(rootDir, defaultDirPerm)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion node/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Options struct {

type NodeOpt func(*Options) error

// Obtain Options by applying given NodeOpts.
// NewMergedOptions obtains Options by applying given NodeOpts.
func NewMergedOptions(opts ...NodeOpt) (*Options, error) {
var options Options
for _, opt := range opts {
Expand Down

0 comments on commit 77de77c

Please sign in to comment.