Run gofmt and add badge to readme

This commit is contained in:
Elara 2022-05-01 01:50:20 -07:00
parent 3a91648f70
commit 8be1fd2348
3 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,7 @@
# lrpc
[![Go Reference](https://pkg.go.dev/badge/go.arsenm.dev/lrpc.svg)](https://pkg.go.dev/go.arsenm.dev/lrpc)
A lightweight RPC framework that aims to be as easy to use as possible, while also being as lightweight as possible. Most current RPC frameworks are bloated to the point of adding 7MB to my binary, like RPCX. That is what prompted me to create this.
---

View File

@ -71,8 +71,8 @@ func Convert(in reflect.Value, toType reflect.Type) (reflect.Value, error) {
// If input is a slice of any, and output is an array or slice
if in.Type() == reflect.TypeOf([]any{}) &&
to.Kind() == reflect.Slice || to.Kind() == reflect.Array {
// Use ConvertSlice to convert value
to.Set(reflect.ValueOf(ConvertSlice(
// Use ConvertSlice to convert value
to.Set(reflect.ValueOf(ConvertSlice(
in.Interface().([]any),
toType,
)))

View File

@ -12,7 +12,7 @@ type Request struct {
type Response struct {
ID string
IsChannel bool
IsError bool
IsError bool
Error string
Return any
}