func (f Float32) Present() bool {
	return f.value != nil
}
Present returns whether or not the value is present.
package optional
import (
	"encoding/json"
	"errors"
)
type Float32 struct {
	value *float32
}
func NewFloat32(v float32) Float32 {
	return Float32{&v}
}
func (f *Float32) Set(v float32) {
	f.value = &v
}
func (f Float32) Get() (float32, error) {
	if !f.Present() {
		var zero float32
		return zero, errors.New("value not present")
	}
	return *f.value, nil
}
func (f Float32) MustGet() float32 {
	if !f.Present() {
		panic("value not present")
	}
	return *f.value
}