Skip to content

Commit d0591b3

Browse files
authored
fix README tests (#211)
1 parent 74e721c commit d0591b3

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ Filter Flags:
337337
--gpu-memory-total-max string Maximum Number of GPUs' total memory (Example: 4 GiB) If --gpu-memory-total-min is not specified, the lower bound will be 0
338338
--gpu-memory-total-min string Minimum Number of GPUs' total memory (Example: 4 GiB) If --gpu-memory-total-max is not specified, the upper bound will be infinity
339339
--gpu-model string GPU Model name (Example: K520)
340-
-g, --gpus int Total Number of GPUs (Example: 4) (sets --gpus-min and -max to the same value)
341-
--gpus-max int Maximum Total Number of GPUs (Example: 4) If --gpus-min is not specified, the lower bound will be 0
342-
--gpus-min int Minimum Total Number of GPUs (Example: 4) If --gpus-max is not specified, the upper bound will be infinity
340+
-g, --gpus int32 Total Number of GPUs (Example: 4) (sets --gpus-min and -max to the same value)
341+
--gpus-max int32 Maximum Total Number of GPUs (Example: 4) If --gpus-min is not specified, the lower bound will be 0
342+
--gpus-min int32 Minimum Total Number of GPUs (Example: 4) If --gpus-max is not specified, the upper bound will be infinity
343343
--hibernation-support Hibernation supported
344344
--hypervisor string Hypervisor: [xen or nitro]
345345
--inference-accelerator-manufacturer string Inference Accelerator Manufacturer name (Example: AWS)
@@ -355,9 +355,9 @@ Filter Flags:
355355
--memory-max string Maximum Amount of Memory available (Example: 4 GiB) If --memory-min is not specified, the lower bound will be 0
356356
--memory-min string Minimum Amount of Memory available (Example: 4 GiB) If --memory-max is not specified, the upper bound will be infinity
357357
--network-encryption Instance Types that support automatic network encryption in-transit
358-
--network-interfaces int Number of network interfaces (ENIs) that can be attached to the instance (sets --network-interfaces-min and -max to the same value)
359-
--network-interfaces-max int Maximum Number of network interfaces (ENIs) that can be attached to the instance If --network-interfaces-min is not specified, the lower bound will be 0
360-
--network-interfaces-min int Minimum Number of network interfaces (ENIs) that can be attached to the instance If --network-interfaces-max is not specified, the upper bound will be infinity
358+
--network-interfaces int32 Number of network interfaces (ENIs) that can be attached to the instance (sets --network-interfaces-min and -max to the same value)
359+
--network-interfaces-max int32 Maximum Number of network interfaces (ENIs) that can be attached to the instance If --network-interfaces-min is not specified, the lower bound will be 0
360+
--network-interfaces-min int32 Minimum Number of network interfaces (ENIs) that can be attached to the instance If --network-interfaces-max is not specified, the upper bound will be infinity
361361
--network-performance int Bandwidth in Gib/s of network performance (Example: 100) (sets --network-performance-min and -max to the same value)
362362
--network-performance-max int Maximum Bandwidth in Gib/s of network performance (Example: 100) If --network-performance-min is not specified, the lower bound will be 0
363363
--network-performance-min int Minimum Bandwidth in Gib/s of network performance (Example: 100) If --network-performance-max is not specified, the upper bound will be infinity
@@ -368,9 +368,9 @@ Filter Flags:
368368
--price-per-hour-min float Minimum Price/hour in USD (Example: 0.09) If --price-per-hour-max is not specified, the upper bound will be infinity
369369
--root-device-type string Supported root device types: [ebs or instance-store]
370370
-u, --usage-class string Usage class: [spot or on-demand]
371-
-c, --vcpus int Number of vcpus available to the instance type. (sets --vcpus-min and -max to the same value)
372-
--vcpus-max int Maximum Number of vcpus available to the instance type. If --vcpus-min is not specified, the lower bound will be 0
373-
--vcpus-min int Minimum Number of vcpus available to the instance type. If --vcpus-max is not specified, the upper bound will be infinity
371+
-c, --vcpus int32 Number of vcpus available to the instance type. (sets --vcpus-min and -max to the same value)
372+
--vcpus-max int32 Maximum Number of vcpus available to the instance type. If --vcpus-min is not specified, the lower bound will be 0
373+
--vcpus-min int32 Minimum Number of vcpus available to the instance type. If --vcpus-max is not specified, the upper bound will be infinity
374374
--vcpus-to-memory-ratio string The ratio of vcpus to GiBs of memory. (Example: 1:2)
375375
--virtualization-type string Virtualization Type supported: [hvm or pv]
376376
@@ -427,7 +427,11 @@ func main() {
427427
}
428428

429429
// Instantiate a new instance of a selector with the AWS session
430-
instanceSelector := selector.New(ctx, cfg)
430+
instanceSelector, err := selector.New(ctx, cfg)
431+
if err != nil {
432+
fmt.Printf("Oh no, there was an error :( %v", err)
433+
return
434+
}
431435

432436
// Instantiate an int range filter to specify min and max vcpus
433437
vcpusRange := selector.Int32RangeFilter{

0 commit comments

Comments
 (0)