File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import (
1010)
1111
1212const (
13- Version = "0.9.0 "
13+ Version = "0.9.1 "
1414 defaultFileHeader = `Code generated by microgen ` + Version + `. DO NOT EDIT.`
1515)
1616
Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ func specialReplyType(p types.Type) *Statement {
130130 return (& Statement {}).Qual (GolangProtobufWrappers , "StringValue" ).Values ()
131131 }
132132 }
133+ // *float64 -> *wrappers.DoubleValue
134+ if name != nil && * name == "float64" && imp == nil {
135+ ptr , ok := p .(types.TPointer )
136+ if ok && ptr .NumberOfPointers == 1 {
137+ return (& Statement {}).Qual (GolangProtobufWrappers , "DoubleValue" ).Values ()
138+ }
139+ }
133140 return nil
134141}
135142
Original file line number Diff line number Diff line change @@ -42,7 +42,9 @@ func specialTypeConverter(p types.Type) *Statement {
4242 }
4343 // time.Time -> timestamp.Timestamp
4444 if name != nil && * name == "Time" && imp != nil && imp .Package == "time" {
45- return Op ("*" ).Qual (GolangProtobufPtypesTimestamp , "Timestamp" )
45+ if types .TypeArray (p ) == nil { // ignore []time.Time case
46+ return Op ("*" ).Qual (GolangProtobufPtypesTimestamp , "Timestamp" )
47+ }
4648 }
4749 // jsonb.JSONB -> string
4850 if name != nil && * name == "JSONB" && imp != nil && imp .Package == JsonbPackage {
@@ -55,6 +57,13 @@ func specialTypeConverter(p types.Type) *Statement {
5557 return Op ("*" ).Qual (GolangProtobufWrappers , "StringValue" )
5658 }
5759 }
60+ // *float64 -> *wrappers.DoubleValue
61+ if name != nil && * name == "float64" && imp == nil {
62+ ptr , ok := p .(types.TPointer )
63+ if ok && ptr .NumberOfPointers == 1 {
64+ return (& Statement {}).Qual (GolangProtobufWrappers , "DoubleValue" ).Values ()
65+ }
66+ }
5867 return nil
5968}
6069
You can’t perform that action at this time.
0 commit comments