Provides helpers functions converting wrapperspb
Go version 1.18+
go get github.com/itcomusic/protowrap
package main
import (
"fmt"
"google.golang.org/protobuf/types/known/wrapperspb"
"github.com/itcomusic/protowrap"
)
func main() {
i := protowrap.IntF32V[int](&wrapperspb.Int32Value{Value: 1})
fmt.Println(*i) // 1
ints := protowrap.Ints[int]([]int32{1, 2, 3})
fmt.Println(ints) // [1, 2, 3]
wi32 := protowrap.Int32Value(i)
fmt.Println(wi32) // value:1
}