Skip to content

Commit eb20c5a

Browse files
committed
move fmt.Sprintf for machineType to inline
1 parent 69977f3 commit eb20c5a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/remote/instance.go

+1-5
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (i *InstanceInfo) CreateOrGetInstance(imageURL, serviceAccount string) erro
9494

9595
inst := &compute.Instance{
9696
Name: i.name,
97-
MachineType: machineType(i.zone, i.machineType),
97+
MachineType: fmt.Sprintf("zones/%s/machineTypes/%s", i.zone, i.machineType),
9898
NetworkInterfaces: []*compute.NetworkInterface{
9999
{
100100
AccessConfigs: []*compute.AccessConfig{
@@ -215,10 +215,6 @@ func getTimestamp() string {
215215
return fmt.Sprintf(time.Now().Format(timestampFormat))
216216
}
217217

218-
func machineType(zone, machineType string) string {
219-
return fmt.Sprintf("zones/%s/machineTypes/%s", zone, machineType)
220-
}
221-
222218
// Create default SSH filewall rule if it does not exist
223219
func (i *InstanceInfo) createDefaultFirewallRule() error {
224220
var err error

0 commit comments

Comments
 (0)