You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: deprecated.go
    path of file: ./repos/storj/cmd/storagenode
    
    the code of the file until where you have to start completion: // Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.

package main

import (
	"fmt"
	"reflect"
	"strconv"
	"time"

	"go.uber.org/zap"
)

// Deprecated contains deprecated config structs.
type Deprecated struct {
	Kademlia struct {
		ExternalAddress string `default:"" hidden:"true"`
		Operator        struct {
			Email  string `default:"" hidden:"true"`
			Wallet string `default:"" hidden:"true"`
		}
	}
	Storage2 struct {
		Monitor struct {
			VerifyDirInterval string `default:"" hidden:"true"`
		}
	}
}

// maps deprecated config values to new values if applicable.
func mapDeprecatedConfigs(log *zap.Logger, cfg *StorageNodeFlags) {
	if cfg == nil {
		return
	}

	type migration struct {
		newValue        interface{}
		newConfigString string
		oldValue        string
		oldConfigString string
	}
	migrations := []migration{
		{

    
func parseOverride(typ reflect.Type, value string) interface{} {
	switch typ {
	case reflect.TypeOf(int(0)):
		val, err := strconv.ParseInt(value, 0, strconv.IntSize)
		if err != nil {
			panic(err)
		}
		return int(val)
	case reflect.TypeOf(int64(0)):
		val, err := strconv.ParseInt(value, 0, 64)
		if err != nil {
			panic(err)
		}
		return val
	case reflect.TypeOf(uint(0)):
		val, err := strconv.ParseUint(value, 0, strconv.IntSize)
		if err != nil {
			panic(err)
		}
		return uint(val)
	case reflect.TypeOf(uint64(0)):
		val, err := strconv.ParseUint(value, 0, 64)
		if err != nil {
			panic(err)
		}
		return val
	case reflect.TypeOf(time.Duration(0)):
		val, err := time.ParseDuration(value)
		if err != nil {
			panic(err)
		}
		return val
	case reflect.TypeOf(float64(0)):
		val, err := strconv.ParseFloat(value, 64)
		if err != nil {
			panic(err)
		}
		return val
	case reflect.TypeOf(string("")):
		return value
	case reflect.TypeOf(bool(false)):
		val, err := strconv.ParseBool(value)
		if err != nil {
			panic(err)
		}
		return val
	default:
		panic(fmt.Sprintf("invalid field type: %s", typ.String()))
	}
}