func NormalizePaths(paths []string) []string {
	normalized := make([]string, len(paths))
	for i, path := range paths {
		normalized[i] = toUnderscore.Replace(path)
	}
	return normalized
}
NormalizePaths converts arguments to field mask paths, replacing '-' with '_'
package util
import (
	"encoding"
	"encoding/hex"
	"fmt"
	"reflect"
	"sort"
	"strings"
	"time"
	"github.com/gogo/protobuf/proto"
	"github.com/gogo/protobuf/types"
	"github.com/spf13/pflag"
	"go.thethings.network/lorawan-stack/v3/pkg/errors"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
)
func DeprecateFlag(flagSet *pflag.FlagSet, old string, new string) {
	if newFlag := flagSet.Lookup(new); newFlag != nil {
		deprecated := *newFlag
		deprecated.Name = old
		deprecated.Usage = strings.Replace(deprecated.Usage, old, new, -1)
		deprecated.Deprecated = fmt.Sprintf("use the %s flag", new)
		deprecated.Hidden = true
		flagSet.AddFlag(&deprecated)
	}
}
func ForwardFlag(flagSet *pflag.FlagSet, old string, new string) {
	if oldFlag := flagSet.Lookup(old); oldFlag != nil && oldFlag.Changed {
		if newFlag := flagSet.Lookup(new); newFlag != nil && !newFlag.Changed {
			flagSet.Set(new, oldFlag.Value.String())
		}
	}
}
func HideFlag(flagSet *pflag.FlagSet, name string) {
	if flag := flagSet.Lookup(name); flag != nil {
		flag.Hidden = true
	}
}
func HideFlagSet(flagSet *pflag.FlagSet) *pflag.FlagSet {
	flagSet.VisitAll(func(f *pflag.Flag) {
		f.Hidden = true
	})
	return flagSet
}
var (
	toDash       = strings.NewReplacer("_", "-")
	toUnderscore = strings.NewReplacer("-", "_")
)