4 ms·
I guess the least the API could do is provide some suitably named constants that represent the various elements such that the call becomes something like -
by blinkingled 9y ago
I guess the least the API could do is provide some suitably named constants that represent the various elements such that the call becomes something like -
err = v.Retrieve(ctx, VSphere.DATASTORE, VSphere.SUMMARY, &dss)
The constants can just be enums that map to the actual valid string representations. That way API user knows the full extent of the parameters and doesn't have to rely on arbitrary strings.