import (
"github.com/googleapis/go-type-adapters/adapters"
dpb "google.golang.org/genproto/type/decimal"
)
func main() {
decimal := &dpb.Decimal{Value: "12345.678"}
flt, err := adapters.DecimalToFloat(decimal)
if err != nil {
panic(err)
}
// flt is a Go *big.Float and can be used as such...
}
License
This software is made available under the Apache 2.0 license.