Files
gocryptotrader/config/versions/v10/v10.go
Adrian Gallagher bb122dcafa codebase: Remove web frontend and related services (#2067)
* 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
2025-09-30 13:32:09 +10:00

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
}