Moving MaybeString to root package
diff --git a/openstack/networking/v2/networks/requests.go b/openstack/networking/v2/networks/requests.go
index 567b31f..0d74eb5 100644
--- a/openstack/networking/v2/networks/requests.go
+++ b/openstack/networking/v2/networks/requests.go
@@ -16,16 +16,6 @@
TenantID string
}
-func ptrToStr(val *bool) string {
- if *val == true {
- return "true"
- } else if *val == false {
- return "false"
- } else {
- return ""
- }
-}
-
// ListOpts allows the filtering and sorting of paginated collections through
// the API. Filtering is achieved by passing in struct field values that map to
// the network attributes you want to see returned. SortKey allows you to sort
@@ -57,13 +47,13 @@
q["name"] = opts.Name
}
if opts.AdminStateUp != nil {
- q["admin_state_up"] = ptrToStr(opts.AdminStateUp)
+ q["admin_state_up"] = strconv.FormatBool(*opts.AdminStateUp)
}
if opts.TenantID != "" {
q["tenant_id"] = opts.TenantID
}
if opts.Shared != nil {
- q["shared"] = ptrToStr(opts.Shared)
+ q["shared"] = strconv.FormatBool(*opts.Shared)
}
if opts.ID != "" {
q["id"] = opts.ID