You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/vendor/github.com/exoscale/egoscale/v2/internal/public-api/public-api.go

25 lines
675 B

// Package publicapi is an internal package containing code generated from the
// Exoscale API OpenAPI specs, as well as helpers and transition types exposed
// in the public-facing package.
package publicapi
//go:generate oapi-codegen -generate types,client -package publicapi -o public-api.gen.go ../../../public-api.json
// OptionalString returns the dereferenced string value of v if not nil, otherwise an empty string.
func OptionalString(v *string) string {
if v != nil {
return *v
}
return ""
}
// OptionalInt64 returns the dereferenced int64 value of v if not nil, otherwise 0.
func OptionalInt64(v *int64) int64 {
if v != nil {
return *v
}
return 0
}