mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-19 07:26:49 +00:00
* Config: Move config versions to separate pacakges * Config: Move version tests to blackbox texts * Config: Protect registerVersion from overflow * Config: Protect against version already registered
20 lines
453 B
Go
20 lines
453 B
Go
package v0
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// Version is a baseline version with no changes, so we can downgrade back to nothing
|
|
// It does not implement any upgrade interfaces
|
|
type Version struct{}
|
|
|
|
// UpgradeConfig is an empty stub
|
|
func (*Version) UpgradeConfig(_ context.Context, j []byte) ([]byte, error) {
|
|
return j, nil
|
|
}
|
|
|
|
// DowngradeConfig is an empty stub
|
|
func (*Version) DowngradeConfig(_ context.Context, j []byte) ([]byte, error) {
|
|
return j, nil
|
|
}
|