Shortened configuration struct names from JobSearchConfig to JSC since they are distinguished by being in the config package anyway

This commit is contained in:
bwilliams committed 2026-10-13 16:16:34 +01:00
1 parent 5ec4b65b91
commit be4770cbab
11 files changed
+71 -67

No files matched your search

+8 -8
View File
@@ -5,31 +5,31 @@ import "reflect"
// JSCKDatabase is the database section's configuration key.
const JSCKDatabase string = "database"
// JobSearchConfigDatabase configures the SQLite database. File is the path to
// JSCDatabase configures the SQLite database. File is the path to
// the database file.
type JobSearchConfigDatabase struct {
type JSCDatabase struct {
File string `cfg:"file"`
}
// ---------- Section methods (see Section) ----------
// Keys returns the keys directly in the section.
func (c *JobSearchConfigDatabase) Keys() []string { return keysOf(c) }
func (c *JSCDatabase) Keys() []string { return keysOf(c) }
func (c JobSearchConfigDatabase) Map() map[string]any { return mapOf(c) }
func (c JSCDatabase) Map() map[string]any { return mapOf(c) }
func (c JobSearchConfigDatabase) Flatten() map[string]any {
func (c JSCDatabase) Flatten() map[string]any {
return flattenOf(JSCKDatabase, c)
}
func (c JobSearchConfigDatabase) TypeOf(key string) (reflect.Kind, error) {
func (c JSCDatabase) TypeOf(key string) (reflect.Kind, error) {
return typeOf(c, key)
}
func (c JobSearchConfigDatabase) ValueOf(key string) (any, error) {
func (c JSCDatabase) ValueOf(key string) (any, error) {
return valueOf(c, key)
}
func (c *JobSearchConfigDatabase) SetValue(key string, value any) error {
func (c *JSCDatabase) SetValue(key string, value any) error {
return setValue(c, key, value)
}