@@ -61,7 +61,7 @@ func (m *Migrator) Run(ctx context.Context, target SchemaVersion) (err error) {
61
61
confPath := filepath .Join (m .workingDir , m .configName )
62
62
logger := m .logger .With ("config_path" , confPath )
63
63
64
- conf , err := readYobj (confPath )
64
+ conf , err := readYAML (confPath )
65
65
if err != nil {
66
66
if errors .Is (err , fs .ErrNotExist ) {
67
67
logger .DebugContext (ctx , "configuration file does not exist" )
@@ -96,7 +96,7 @@ func (m *Migrator) Run(ctx context.Context, target SchemaVersion) (err error) {
96
96
}
97
97
98
98
// getVersion returns the schema version from the configuration object.
99
- func (m * Migrator ) getVersion (conf yobj ) (v SchemaVersion , err error ) {
99
+ func (m * Migrator ) getVersion (conf yObj ) (v SchemaVersion , err error ) {
100
100
verInt , err := fieldVal [int ](conf , SchemaVersionKey )
101
101
if err != nil {
102
102
return 0 , err
@@ -112,11 +112,11 @@ func (m *Migrator) getVersion(conf yobj) (v SchemaVersion, err error) {
112
112
}
113
113
114
114
// migrateFunc is a function that upgrades conf or returns an error.
115
- type migrateFunc = func (ctx context.Context , conf yobj ) (err error )
115
+ type migrateFunc = func (ctx context.Context , conf yObj ) (err error )
116
116
117
117
// migrate performs migrations from current schema version to the target one.
118
118
// It returns an error from the first failed migration.
119
- func (m * Migrator ) migrate (ctx context.Context , conf yobj , curr , targ SchemaVersion ) (err error ) {
119
+ func (m * Migrator ) migrate (ctx context.Context , conf yObj , curr , targ SchemaVersion ) (err error ) {
120
120
migrations := [VersionLatest ]migrateFunc {
121
121
// There is obviously no migration to the initial version.
122
122
0 : nil ,
@@ -186,7 +186,7 @@ func (m *Migrator) backupConfig(
186
186
func (m * Migrator ) writeMigrated (
187
187
ctx context.Context ,
188
188
l * slog.Logger ,
189
- conf yobj ,
189
+ conf yObj ,
190
190
origPath string ,
191
191
curr SchemaVersion ,
192
192
targ SchemaVersion ,
0 commit comments