Skip to content

Commit

Permalink
Config: Move OrderManager upgrade to Version management
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Dec 1, 2024
1 parent 5fb08d2 commit d86f30b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions config/versions/v4.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package versions

import (
"context"
)

// Version4 implements ConfigVersion
type Version4 struct {
}

func init() {
Manager.registerVersion(4, &Version4{})
}

// UpgradeConfig sets OrderManager config to defaults
func (v *Version4) UpgradeConfig(_ context.Context, c []byte) ([]byte, error) {
return e, err

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / lint

undefined: e

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (ubuntu-latest, amd64, true, false)

undefined: e

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (ubuntu-latest, amd64, true, false)

undefined: err

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (ubuntu-latest, 386, true, true)

undefined: e

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (ubuntu-latest, 386, true, true)

undefined: err

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (macos-latest, amd64, true, true)

undefined: e

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (macos-latest, amd64, true, true)

undefined: err

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (macos-13, amd64, true, true)

undefined: e

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (macos-13, amd64, true, true)

undefined: err

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (windows-latest, amd64, true, true)

undefined: e

Check failure on line 17 in config/versions/v4.go

View workflow job for this annotation

GitHub Actions / GoCryptoTrader back-end (windows-latest, amd64, true, true)

undefined: err
}

// DowngradeConfig doesn't need to do anything for this version
func (v *Version4) DowngradeConfig(_ context.Context, e []byte) ([]byte, error) {
return e, nil
}

0 comments on commit d86f30b

Please sign in to comment.