mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-04 07:26:47 +00:00
* codebase: Remove web frontend and related services * refactor: Update StartPPROF to accept context and adjust related tests * refactor: Simplify SetIfZero functions and update related tests * config: Clarify DowngradeConfig method documentation regarding permanent removal of deprecated fields * refactor: Rename setIfZeroAndWarn to setDefaultIfZeroWarn for clarity and update related calls * refactor: Update error handling in DataHistoryManager and remove redundant error variable
23 lines
669 B
Go
23 lines
669 B
Go
package v10
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/buger/jsonparser"
|
|
)
|
|
|
|
// Version implements ConfigVersion
|
|
type Version struct{}
|
|
|
|
// UpgradeConfig checks and removes the deprecatedRPC and websocketRPC fields from the remoteControl config
|
|
func (*Version) UpgradeConfig(_ context.Context, e []byte) ([]byte, error) {
|
|
e = jsonparser.Delete(e, "remoteControl", "deprecatedRPC")
|
|
e = jsonparser.Delete(e, "remoteControl", "websocketRPC")
|
|
return e, nil
|
|
}
|
|
|
|
// DowngradeConfig is a no-op. It does not restore deprecatedRPC or websocketRPC on downgrade as their removal is permanent
|
|
func (*Version) DowngradeConfig(_ context.Context, e []byte) ([]byte, error) {
|
|
return e, nil
|
|
}
|