Skip to content

Commit

Permalink
Run goimports on go source files
Browse files Browse the repository at this point in the history
* ensure format consistency
* clean up make output
  • Loading branch information
bruceadowns committed Sep 1, 2018
1 parent 2431ae0 commit 8e04e3c
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
8 changes: 4 additions & 4 deletions guest/operations_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ func (m OperationsManager) FileManager(ctx context.Context) (*FileManager, error

return &FileManager{
ManagedObjectReference: *g.FileManager,
vm: m.vm,
c: m.c,
mu: new(sync.Mutex),
hosts: make(map[string]string),
vm: m.vm,
c: m.c,
mu: new(sync.Mutex),
hosts: make(map[string]string),
}, nil
}

Expand Down
4 changes: 2 additions & 2 deletions lookup/simulator/simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var content = types.LookupServiceContent{
LookupService: vim.ManagedObjectReference{Type: "LookupLookupService", Value: "lookupService"},
ServiceRegistration: &vim.ManagedObjectReference{Type: "LookupServiceRegistration", Value: "ServiceRegistration"},
DeploymentInformationService: vim.ManagedObjectReference{Type: "LookupDeploymentInformationService", Value: "deploymentInformationService"},
L10n: vim.ManagedObjectReference{Type: "LookupL10n", Value: "l10n"},
L10n: vim.ManagedObjectReference{Type: "LookupL10n", Value: "l10n"},
}

func New() *simulator.Registry {
Expand All @@ -43,7 +43,7 @@ func New() *simulator.Registry {
})
r.Put(&ServiceRegistration{
ManagedObjectReference: *content.ServiceRegistration,
Info: registrationInfo(),
Info: registrationInfo(),
})

return r
Expand Down
4 changes: 2 additions & 2 deletions object/file_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ func (f FileManager) DeleteDatastoreFile(ctx context.Context, name string, dc *D
// MakeDirectory creates a folder using the specified name.
func (f FileManager) MakeDirectory(ctx context.Context, name string, dc *Datacenter, createParentDirectories bool) error {
req := types.MakeDirectory{
This: f.Reference(),
Name: name,
This: f.Reference(),
Name: name,
CreateParentDirectories: types.NewBool(createParentDirectories),
}

Expand Down
2 changes: 1 addition & 1 deletion object/host_certificate_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (m HostCertificateManager) CertificateInfo(ctx context.Context) (*HostCerti
// Use InstallServerCertificate to import this certificate.
func (m HostCertificateManager) GenerateCertificateSigningRequest(ctx context.Context, useIPAddressAsCommonName bool) (string, error) {
req := types.GenerateCertificateSigningRequest{
This: m.Reference(),
This: m.Reference(),
UseIpAddressAsCommonName: useIPAddressAsCommonName,
}

Expand Down
2 changes: 1 addition & 1 deletion object/virtual_device_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ var devices = VirtualDeviceList([]types.BaseVirtualDevice{
ControllerKey: 100,
UnitNumber: intPtrValue(17),
},
Id: 1754519335,
Id: 1754519335,
AllowUnrestrictedCommunication: types.NewBool(false),
},
&types.VirtualLsiLogicController{
Expand Down
20 changes: 10 additions & 10 deletions simulator/esx/host_config_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -489,7 +489,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -524,7 +524,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -555,7 +555,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -586,7 +586,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -617,7 +617,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -648,7 +648,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -679,7 +679,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -710,7 +710,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down Expand Up @@ -741,7 +741,7 @@ var HostConfigInfo = types.HostConfigInfo{
SubnetMask: "255.0.0.0",
IpV6Config: (*types.HostIpConfigIpV6AddressConfiguration)(nil),
},
Mac: "00:0c:29:81:d8:a0",
Mac: "00:0c:29:81:d8:a0",
DistributedVirtualPort: (*types.DistributedVirtualSwitchPortConnection)(nil),
Portgroup: "Management Network",
Mtu: 1500,
Expand Down
2 changes: 1 addition & 1 deletion simulator/esx/host_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -1730,7 +1730,7 @@ var HostSystem = mo.HostSystem{
OverallMemoryUsage: 1404,
DistributedCpuFairness: 0,
DistributedMemoryFairness: 0,
Uptime: 77229,
Uptime: 77229,
},
OverallStatus: "gray",
RebootRequired: false,
Expand Down
8 changes: 4 additions & 4 deletions simulator/esx/resource_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var ResourcePool = mo.ResourcePool{
DynamicData: types.DynamicData{},
Reservation: types.NewInt64(4121),
ExpandableReservation: types.NewBool(false),
Limit: types.NewInt64(4121),
Limit: types.NewInt64(4121),
Shares: &types.SharesInfo{
DynamicData: types.DynamicData{},
Shares: 9000,
Expand All @@ -72,7 +72,7 @@ var ResourcePool = mo.ResourcePool{
DynamicData: types.DynamicData{},
Reservation: types.NewInt64(961),
ExpandableReservation: types.NewBool(false),
Limit: types.NewInt64(961),
Limit: types.NewInt64(961),
Shares: &types.SharesInfo{
DynamicData: types.DynamicData{},
Shares: 9000,
Expand Down Expand Up @@ -140,7 +140,7 @@ var ResourcePool = mo.ResourcePool{
DynamicData: types.DynamicData{},
Reservation: types.NewInt64(4121),
ExpandableReservation: types.NewBool(false),
Limit: types.NewInt64(4121),
Limit: types.NewInt64(4121),
Shares: &types.SharesInfo{
DynamicData: types.DynamicData{},
Shares: 9000,
Expand All @@ -152,7 +152,7 @@ var ResourcePool = mo.ResourcePool{
DynamicData: types.DynamicData{},
Reservation: types.NewInt64(961),
ExpandableReservation: types.NewBool(false),
Limit: types.NewInt64(961),
Limit: types.NewInt64(961),
Shares: &types.SharesInfo{
DynamicData: types.DynamicData{},
Shares: 9000,
Expand Down
2 changes: 1 addition & 1 deletion simulator/esx/virtual_device.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ var VirtualDevice = []types.BaseVirtualDevice{
ControllerKey: 100,
UnitNumber: types.NewInt32(17),
},
Id: -1,
Id: -1,
AllowUnrestrictedCommunication: types.NewBool(false),
FilterEnable: types.NewBool(true),
FilterInfo: (*types.VirtualMachineVMCIDeviceFilterInfo)(nil),
Expand Down
4 changes: 2 additions & 2 deletions simulator/ip_pool_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ import (
)

var ipPool = MustNewIpPool(&types.IpPool{
Id: 1,
Name: "ip-pool",
Id: 1,
Name: "ip-pool",
AvailableIpv4Addresses: 250,
AvailableIpv6Addresses: 250,
AllocatedIpv6Addresses: 0,
Expand Down
10 changes: 5 additions & 5 deletions simulator/ip_pool_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func TestIpPoolv4(t *testing.T) {

for _, test := range tests {
var ipPool = MustNewIpPool(&types.IpPool{
Id: 1,
Name: "ip-pool",
Id: 1,
Name: "ip-pool",
AvailableIpv4Addresses: test.length,
AvailableIpv6Addresses: 0,
AllocatedIpv6Addresses: 0,
Expand Down Expand Up @@ -119,8 +119,8 @@ func TestIpPoolv6(t *testing.T) {

for _, test := range tests {
var ipPool = MustNewIpPool(&types.IpPool{
Id: 1,
Name: "ip-pool",
Id: 1,
Name: "ip-pool",
AvailableIpv4Addresses: 0,
AvailableIpv6Addresses: test.length,
AllocatedIpv6Addresses: 0,
Expand Down Expand Up @@ -210,7 +210,7 @@ func TestIpPoolManagerLifecycle(t *testing.T) {
ref := types.ManagedObjectReference{Type: "IpPoolManager", Value: "IpPoolManager"}

var ipPool = &types.IpPool{
Name: "ip-pool",
Name: "ip-pool",
AvailableIpv4Addresses: 250,
AvailableIpv6Addresses: 250,
AllocatedIpv4Addresses: 0,
Expand Down
6 changes: 3 additions & 3 deletions simulator/property_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ func TestPropertyCollectorWithUnsetValues(t *testing.T) {
vmRef := vm.Reference()

propSets := [][]string{
{"parentVApp"}, // unset string by default (not returned by RetrievePropertiesEx)
{"rootSnapshot"}, // unset VirtualMachineSnapshot[] by default (returned by RetrievePropertiesEx)
{"config.networkShaper.enabled"}, // unset at config.networkShaper level by default (not returned by RetrievePropertiesEx)
{"parentVApp"}, // unset string by default (not returned by RetrievePropertiesEx)
{"rootSnapshot"}, // unset VirtualMachineSnapshot[] by default (returned by RetrievePropertiesEx)
{"config.networkShaper.enabled"}, // unset at config.networkShaper level by default (not returned by RetrievePropertiesEx)
{"parentVApp", "rootSnapshot", "config.networkShaper.enabled"}, // (not returned by RetrievePropertiesEx)
{"name", "parentVApp", "rootSnapshot", "config.networkShaper.enabled"}, // (only name returned by RetrievePropertiesEx)
{"name", "config.guestFullName"}, // both set (and returned by RetrievePropertiesEx))
Expand Down
4 changes: 2 additions & 2 deletions simulator/virtual_disk_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (m *VirtualDiskManager) MoveVirtualDiskTask(req *types.MoveVirtualDisk_Task
SourceDatacenter: req.SourceDatacenter,
DestinationName: dest[i],
DestinationDatacenter: req.DestDatacenter,
Force: req.Force,
Force: req.Force,
})

if err != nil {
Expand Down Expand Up @@ -168,7 +168,7 @@ func (m *VirtualDiskManager) CopyVirtualDiskTask(req *types.CopyVirtualDisk_Task
SourceDatacenter: req.SourceDatacenter,
DestinationName: dest[i],
DestinationDatacenter: req.DestDatacenter,
Force: req.Force,
Force: req.Force,
})

if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion vim25/types/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func defaultResourceAllocationInfo() ResourceAllocationInfo {
return ResourceAllocationInfo{
Reservation: NewInt64(0),
ExpandableReservation: NewBool(true),
Limit: NewInt64(-1),
Limit: NewInt64(-1),
Shares: &SharesInfo{
Level: SharesLevelNormal,
},
Expand Down

0 comments on commit 8e04e3c

Please sign in to comment.