🐛 Fix panic at adding services
This commit is contained in:
parent
d64743162f
commit
7541292f68
@ -3,6 +3,7 @@ package grpc
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/internal/directory"
|
"git.solsynth.dev/hydrogen/dealer/pkg/internal/directory"
|
||||||
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
"git.solsynth.dev/hydrogen/dealer/pkg/proto"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
@ -10,6 +11,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func warpServiceInstanceToInfo(in *directory.ServiceInstance) *proto.ServiceInfo {
|
func warpServiceInstanceToInfo(in *directory.ServiceInstance) *proto.ServiceInfo {
|
||||||
|
if in == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return &proto.ServiceInfo{
|
return &proto.ServiceInfo{
|
||||||
Id: in.ID,
|
Id: in.ID,
|
||||||
Type: in.Type,
|
Type: in.Type,
|
||||||
|
Loading…
Reference in New Issue
Block a user