优化代码

This commit is contained in:
GoEdgeLab
2022-07-30 16:28:28 +08:00
parent a695502904
commit 778f93d89e

View File

@@ -535,9 +535,8 @@ func (this *ServerService) UpdateServerNames(ctx context.Context, req *pb.Update
return nil, err
}
if len(serverNameConfigs) > 0 {
for index, serverName := range serverNameConfigs {
for _, serverName := range serverNameConfigs {
serverName.Normalize()
serverNameConfigs[index] = serverName
}
req.ServerNamesJSON, err = json.Marshal(serverNameConfigs)
if err != nil {