|
|
@ -5,9 +5,9 @@ import (
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
toml "github.com/pelletier/go-toml"
|
|
|
|
"github.com/zk-org/zk/internal/util/errors"
|
|
|
|
"github.com/zk-org/zk/internal/util/errors"
|
|
|
|
"github.com/zk-org/zk/internal/util/opt"
|
|
|
|
"github.com/zk-org/zk/internal/util/opt"
|
|
|
|
toml "github.com/pelletier/go-toml"
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// Config holds the user configuration.
|
|
|
|
// Config holds the user configuration.
|
|
|
@ -23,6 +23,10 @@ type Config struct {
|
|
|
|
Extra map[string]string
|
|
|
|
Extra map[string]string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NOTE: config generation occurs in core.Init. The below function is used
|
|
|
|
|
|
|
|
// for test cases and as a program level default if the user conf is missing or
|
|
|
|
|
|
|
|
// has values missing.
|
|
|
|
|
|
|
|
|
|
|
|
// NewDefaultConfig creates a new Config with the default settings.
|
|
|
|
// NewDefaultConfig creates a new Config with the default settings.
|
|
|
|
func NewDefaultConfig() Config {
|
|
|
|
func NewDefaultConfig() Config {
|
|
|
|
return Config{
|
|
|
|
return Config{
|
|
|
@ -522,7 +526,7 @@ type tomlNoteConfig struct {
|
|
|
|
IDLength int `toml:"id-length"`
|
|
|
|
IDLength int `toml:"id-length"`
|
|
|
|
IDCase string `toml:"id-case"`
|
|
|
|
IDCase string `toml:"id-case"`
|
|
|
|
Exclude []string `toml:"exclude"`
|
|
|
|
Exclude []string `toml:"exclude"`
|
|
|
|
Ignore []string `toml:"ignore"` // Legacy alias to `exclude`
|
|
|
|
Ignore []string `toml:"ignore"` // Legacy alias to `exclude`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type tomlGroupConfig struct {
|
|
|
|
type tomlGroupConfig struct {
|
|
|
|