Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStruct ¶ added in v0.1.12
func ConvertStruct(from interface{}, to interface{}) (interface{}, error)
ConvertStruct converts a GRPC struct to a given struct
Usage:
filledGoClientStruct, err := ConvertStruct(grpcStruct, emptyGoClientStruct) grpcStruct - The struct returned from gRPC calls. emptyGoClientStruct - The empty go client struct. This could be: "(*Foo)(nil)" or "&Foo{}". But this can not be "nil". That's because the code can not tell the type if it's just a nil interface. This struct is never filled in. It's only used to tell the type of the Go client struct so that it can be constructed, filled in, and returned filledGoClientStruct - This is the filled in Go client struct. This is created from the type of emptyGoClientStruct. This is why emptyGoClientStruct can not be just nil. This return value is always a pointer of the base type of emptyGoClientStruct. For example, the return value could be of type "*Foo", "*[]*Foo", or "*map[string]*Foo".
func FetchFileLoc ¶
FetchFileLoc fetches the file location relative to the module root, eg. the same directory as go.mod.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.