[#66] node: Replace interface{} with any

Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
Alejandro Lopez 2023-02-21 14:42:45 +03:00 committed by Alejandro Lopez
parent 3d873237d5
commit cb5468abb8
67 changed files with 135 additions and 135 deletions

View file

@ -12,7 +12,7 @@ import (
)
// PrintVerbose prints to the stdout if the commonflags.Verbose flag is on.
func PrintVerbose(cmd *cobra.Command, format string, a ...interface{}) {
func PrintVerbose(cmd *cobra.Command, format string, a ...any) {
if viper.GetBool(commonflags.Verbose) {
cmd.Printf(format+"\n", a...)
}

View file

@ -58,9 +58,9 @@ func listShards(cmd *cobra.Command, _ []string) {
}
func prettyPrintShardsJSON(cmd *cobra.Command, ii []*control.ShardInfo) {
out := make([]map[string]interface{}, 0, len(ii))
out := make([]map[string]any, 0, len(ii))
for _, i := range ii {
out = append(out, map[string]interface{}{
out = append(out, map[string]any{
"shard_id": base58.Encode(i.Shard_ID),
"mode": shardModeToString(i.GetMode()),
"metabase": i.GetMetabasePath(),

View file

@ -127,7 +127,7 @@ type sgHeadReceiver struct {
prm internalclient.HeadObjectPrm
}
func (c sgHeadReceiver) Head(addr oid.Address) (interface{}, error) {
func (c sgHeadReceiver) Head(addr oid.Address) (any, error) {
c.prm.SetAddress(addr)
res, err := internalclient.HeadObject(c.prm)