Files
kata-containers/vendor/github.com/firecracker-microvm/firecracker-go-sdk/pointer_helpers.go
Manohar Castelino 5c6d94d756 firecracker: Revendor firecracker go sdk to 0.12.0
Revendor firecracker go sdk for Firecracker 0.12.0 API changes

git shortlog

9614612 (HEAD -> master, origin/master, origin/HEAD) Merge pull request
653c342 Adding drives builder
3c1f5c3 Merge pr #41
c4151ff Migrate firectl to its own repository
433f262 Merge pull request #23 from xibz/fifo_logging_file
121ef9a add handler lists to handle initialization
0fd9825 Adding support for capturing fifo logs to file.
6b08ec7 Merge branch 'fc-0.12.0'
25878e7 Update for Firecracker 0.12.0 API changes
ea93f77 Regenerate API client from swagger spec
00d8eee Update swagger.yaml for firecracker 0.12.0

Signed-off-by: Manohar Castelino <manohar.r.castelino@intel.com>
2018-12-27 19:47:17 -08:00

47 lines
882 B
Go

package firecracker
// BoolValue will return a boolean value. If the pointer is nil, then false
// will be returned.
func BoolValue(b *bool) bool {
if b == nil {
return false
}
return *b
}
// Bool will return a pointer value of the given parameter.
func Bool(b bool) *bool {
return &b
}
// StringValue will return a string value. If the pointer is nil, then an empty
// string will be returned.
func StringValue(str *string) string {
if str == nil {
return ""
}
return *str
}
// String will return a pointer value of the given parameter.
func String(str string) *string {
return &str
}
// Int64 will return a pointer value of the given parameter.
func Int64(v int64) *int64 {
return &v
}
// Int64Value will return an int64 value. If the pointer is nil, then zero will
// be returned.
func Int64Value(v *int64) int64 {
if v == nil {
return 0
}
return *v
}